Add btree_gin contrib module.
[PostgreSQL.git] / contrib / btree_gin / btree_gin.sql.in
blobe4326ebdabb50a71c4d894dd809f62cc0dbbfd4c
1 /* $PostgreSQL$ */
3 -- Adjust this setting to control where the objects get created.
4 SET search_path = public;
6 CREATE OR REPLACE FUNCTION gin_btree_consistent(internal, int2, anyelement, int4, internal, internal)
7 RETURNS bool
8 AS 'MODULE_PATHNAME'
9 LANGUAGE C STRICT IMMUTABLE;
11 CREATE OR REPLACE FUNCTION gin_extract_value_int2(int2, internal)
12 RETURNS internal
13 AS 'MODULE_PATHNAME'
14 LANGUAGE C STRICT IMMUTABLE;
16 CREATE OR REPLACE FUNCTION gin_compare_prefix_int2(int2, int2, int2, internal)
17 RETURNS int4
18 AS 'MODULE_PATHNAME'
19 LANGUAGE C STRICT IMMUTABLE;
21 CREATE OR REPLACE FUNCTION gin_extract_query_int2(int2, internal, int2, internal, internal)
22 RETURNS internal
23 AS 'MODULE_PATHNAME'
24 LANGUAGE C STRICT IMMUTABLE;
26 CREATE OPERATOR CLASS int2_ops
27 DEFAULT FOR TYPE int2 USING gin
29 OPERATOR 1 <,
30 OPERATOR 2 <=,
31 OPERATOR 3 =,
32 OPERATOR 4 >=,
33 OPERATOR 5 >,
34 FUNCTION 1 btint2cmp(int2,int2),
35 FUNCTION 2 gin_extract_value_int2(int2, internal),
36 FUNCTION 3 gin_extract_query_int2(int2, internal, int2, internal, internal),
37 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
38 FUNCTION 5 gin_compare_prefix_int2(int2,int2,int2, internal),
39 STORAGE int2;
41 CREATE OR REPLACE FUNCTION gin_extract_value_int4(int4, internal)
42 RETURNS internal
43 AS 'MODULE_PATHNAME'
44 LANGUAGE C STRICT IMMUTABLE;
46 CREATE OR REPLACE FUNCTION gin_compare_prefix_int4(int4, int4, int2, internal)
47 RETURNS int4
48 AS 'MODULE_PATHNAME'
49 LANGUAGE C STRICT IMMUTABLE;
51 CREATE OR REPLACE FUNCTION gin_extract_query_int4(int4, internal, int2, internal, internal)
52 RETURNS internal
53 AS 'MODULE_PATHNAME'
54 LANGUAGE C STRICT IMMUTABLE;
56 CREATE OPERATOR CLASS int4_ops
57 DEFAULT FOR TYPE int4 USING gin
59 OPERATOR 1 <,
60 OPERATOR 2 <=,
61 OPERATOR 3 =,
62 OPERATOR 4 >=,
63 OPERATOR 5 >,
64 FUNCTION 1 btint4cmp(int4,int4),
65 FUNCTION 2 gin_extract_value_int4(int4, internal),
66 FUNCTION 3 gin_extract_query_int4(int4, internal, int2, internal, internal),
67 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
68 FUNCTION 5 gin_compare_prefix_int4(int4,int4,int2, internal),
69 STORAGE int4;
71 CREATE OR REPLACE FUNCTION gin_extract_value_int8(int8, internal)
72 RETURNS internal
73 AS 'MODULE_PATHNAME'
74 LANGUAGE C STRICT IMMUTABLE;
76 CREATE OR REPLACE FUNCTION gin_compare_prefix_int8(int8, int8, int2, internal)
77 RETURNS int4
78 AS 'MODULE_PATHNAME'
79 LANGUAGE C STRICT IMMUTABLE;
81 CREATE OR REPLACE FUNCTION gin_extract_query_int8(int8, internal, int2, internal, internal)
82 RETURNS internal
83 AS 'MODULE_PATHNAME'
84 LANGUAGE C STRICT IMMUTABLE;
86 CREATE OPERATOR CLASS int8_ops
87 DEFAULT FOR TYPE int8 USING gin
89 OPERATOR 1 <,
90 OPERATOR 2 <=,
91 OPERATOR 3 =,
92 OPERATOR 4 >=,
93 OPERATOR 5 >,
94 FUNCTION 1 btint8cmp(int8,int8),
95 FUNCTION 2 gin_extract_value_int8(int8, internal),
96 FUNCTION 3 gin_extract_query_int8(int8, internal, int2, internal, internal),
97 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
98 FUNCTION 5 gin_compare_prefix_int8(int8,int8,int2, internal),
99 STORAGE int8;
101 CREATE OR REPLACE FUNCTION gin_extract_value_float4(float4, internal)
102 RETURNS internal
103 AS 'MODULE_PATHNAME'
104 LANGUAGE C STRICT IMMUTABLE;
106 CREATE OR REPLACE FUNCTION gin_compare_prefix_float4(float4, float4, int2, internal)
107 RETURNS int4
108 AS 'MODULE_PATHNAME'
109 LANGUAGE C STRICT IMMUTABLE;
111 CREATE OR REPLACE FUNCTION gin_extract_query_float4(float4, internal, int2, internal, internal)
112 RETURNS internal
113 AS 'MODULE_PATHNAME'
114 LANGUAGE C STRICT IMMUTABLE;
116 CREATE OPERATOR CLASS float4_ops
117 DEFAULT FOR TYPE float4 USING gin
119 OPERATOR 1 <,
120 OPERATOR 2 <=,
121 OPERATOR 3 =,
122 OPERATOR 4 >=,
123 OPERATOR 5 >,
124 FUNCTION 1 btfloat4cmp(float4,float4),
125 FUNCTION 2 gin_extract_value_float4(float4, internal),
126 FUNCTION 3 gin_extract_query_float4(float4, internal, int2, internal, internal),
127 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
128 FUNCTION 5 gin_compare_prefix_float4(float4,float4,int2, internal),
129 STORAGE float4;
131 CREATE OR REPLACE FUNCTION gin_extract_value_float8(float8, internal)
132 RETURNS internal
133 AS 'MODULE_PATHNAME'
134 LANGUAGE C STRICT IMMUTABLE;
136 CREATE OR REPLACE FUNCTION gin_compare_prefix_float8(float8, float8, int2, internal)
137 RETURNS int4
138 AS 'MODULE_PATHNAME'
139 LANGUAGE C STRICT IMMUTABLE;
141 CREATE OR REPLACE FUNCTION gin_extract_query_float8(float8, internal, int2, internal, internal)
142 RETURNS internal
143 AS 'MODULE_PATHNAME'
144 LANGUAGE C STRICT IMMUTABLE;
146 CREATE OPERATOR CLASS float8_ops
147 DEFAULT FOR TYPE float8 USING gin
149 OPERATOR 1 <,
150 OPERATOR 2 <=,
151 OPERATOR 3 =,
152 OPERATOR 4 >=,
153 OPERATOR 5 >,
154 FUNCTION 1 btfloat8cmp(float8,float8),
155 FUNCTION 2 gin_extract_value_float8(float8, internal),
156 FUNCTION 3 gin_extract_query_float8(float8, internal, int2, internal, internal),
157 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
158 FUNCTION 5 gin_compare_prefix_float8(float8,float8,int2, internal),
159 STORAGE float8;
161 CREATE OR REPLACE FUNCTION gin_extract_value_money(money, internal)
162 RETURNS internal
163 AS 'MODULE_PATHNAME'
164 LANGUAGE C STRICT IMMUTABLE;
166 CREATE OR REPLACE FUNCTION gin_compare_prefix_money(money, money, int2, internal)
167 RETURNS int4
168 AS 'MODULE_PATHNAME'
169 LANGUAGE C STRICT IMMUTABLE;
171 CREATE OR REPLACE FUNCTION gin_extract_query_money(money, internal, int2, internal, internal)
172 RETURNS internal
173 AS 'MODULE_PATHNAME'
174 LANGUAGE C STRICT IMMUTABLE;
176 CREATE OPERATOR CLASS money_ops
177 DEFAULT FOR TYPE money USING gin
179 OPERATOR 1 <,
180 OPERATOR 2 <=,
181 OPERATOR 3 =,
182 OPERATOR 4 >=,
183 OPERATOR 5 >,
184 FUNCTION 1 cash_cmp(money,money),
185 FUNCTION 2 gin_extract_value_money(money, internal),
186 FUNCTION 3 gin_extract_query_money(money, internal, int2, internal, internal),
187 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
188 FUNCTION 5 gin_compare_prefix_money(money,money,int2, internal),
189 STORAGE money;
191 CREATE OR REPLACE FUNCTION gin_extract_value_oid(oid, internal)
192 RETURNS internal
193 AS 'MODULE_PATHNAME'
194 LANGUAGE C STRICT IMMUTABLE;
196 CREATE OR REPLACE FUNCTION gin_compare_prefix_oid(oid, oid, int2, internal)
197 RETURNS int4
198 AS 'MODULE_PATHNAME'
199 LANGUAGE C STRICT IMMUTABLE;
201 CREATE OR REPLACE FUNCTION gin_extract_query_oid(oid, internal, int2, internal, internal)
202 RETURNS internal
203 AS 'MODULE_PATHNAME'
204 LANGUAGE C STRICT IMMUTABLE;
206 CREATE OPERATOR CLASS oid_ops
207 DEFAULT FOR TYPE oid USING gin
209 OPERATOR 1 <,
210 OPERATOR 2 <=,
211 OPERATOR 3 =,
212 OPERATOR 4 >=,
213 OPERATOR 5 >,
214 FUNCTION 1 btoidcmp(oid,oid),
215 FUNCTION 2 gin_extract_value_oid(oid, internal),
216 FUNCTION 3 gin_extract_query_oid(oid, internal, int2, internal, internal),
217 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
218 FUNCTION 5 gin_compare_prefix_oid(oid,oid,int2, internal),
219 STORAGE oid;
221 CREATE OR REPLACE FUNCTION gin_extract_value_timestamp(timestamp, internal)
222 RETURNS internal
223 AS 'MODULE_PATHNAME'
224 LANGUAGE C STRICT IMMUTABLE;
226 CREATE OR REPLACE FUNCTION gin_compare_prefix_timestamp(timestamp, timestamp, int2, internal)
227 RETURNS int4
228 AS 'MODULE_PATHNAME'
229 LANGUAGE C STRICT IMMUTABLE;
231 CREATE OR REPLACE FUNCTION gin_extract_query_timestamp(timestamp, internal, int2, internal, internal)
232 RETURNS internal
233 AS 'MODULE_PATHNAME'
234 LANGUAGE C STRICT IMMUTABLE;
236 CREATE OPERATOR CLASS timestamp_ops
237 DEFAULT FOR TYPE timestamp USING gin
239 OPERATOR 1 <,
240 OPERATOR 2 <=,
241 OPERATOR 3 =,
242 OPERATOR 4 >=,
243 OPERATOR 5 >,
244 FUNCTION 1 timestamp_cmp(timestamp,timestamp),
245 FUNCTION 2 gin_extract_value_timestamp(timestamp, internal),
246 FUNCTION 3 gin_extract_query_timestamp(timestamp, internal, int2, internal, internal),
247 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
248 FUNCTION 5 gin_compare_prefix_timestamp(timestamp,timestamp,int2, internal),
249 STORAGE timestamp;
251 CREATE OR REPLACE FUNCTION gin_extract_value_timestamptz(timestamptz, internal)
252 RETURNS internal
253 AS 'MODULE_PATHNAME'
254 LANGUAGE C STRICT IMMUTABLE;
256 CREATE OR REPLACE FUNCTION gin_compare_prefix_timestamptz(timestamptz, timestamptz, int2, internal)
257 RETURNS int4
258 AS 'MODULE_PATHNAME'
259 LANGUAGE C STRICT IMMUTABLE;
261 CREATE OR REPLACE FUNCTION gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal)
262 RETURNS internal
263 AS 'MODULE_PATHNAME'
264 LANGUAGE C STRICT IMMUTABLE;
266 CREATE OPERATOR CLASS timestamptz_ops
267 DEFAULT FOR TYPE timestamptz USING gin
269 OPERATOR 1 <,
270 OPERATOR 2 <=,
271 OPERATOR 3 =,
272 OPERATOR 4 >=,
273 OPERATOR 5 >,
274 FUNCTION 1 timestamptz_cmp(timestamptz,timestamptz),
275 FUNCTION 2 gin_extract_value_timestamptz(timestamptz, internal),
276 FUNCTION 3 gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal),
277 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
278 FUNCTION 5 gin_compare_prefix_timestamptz(timestamptz,timestamptz,int2, internal),
279 STORAGE timestamptz;
281 CREATE OR REPLACE FUNCTION gin_extract_value_time(time, internal)
282 RETURNS internal
283 AS 'MODULE_PATHNAME'
284 LANGUAGE C STRICT IMMUTABLE;
286 CREATE OR REPLACE FUNCTION gin_compare_prefix_time(time, time, int2, internal)
287 RETURNS int4
288 AS 'MODULE_PATHNAME'
289 LANGUAGE C STRICT IMMUTABLE;
291 CREATE OR REPLACE FUNCTION gin_extract_query_time(time, internal, int2, internal, internal)
292 RETURNS internal
293 AS 'MODULE_PATHNAME'
294 LANGUAGE C STRICT IMMUTABLE;
296 CREATE OPERATOR CLASS time_ops
297 DEFAULT FOR TYPE time USING gin
299 OPERATOR 1 <,
300 OPERATOR 2 <=,
301 OPERATOR 3 =,
302 OPERATOR 4 >=,
303 OPERATOR 5 >,
304 FUNCTION 1 time_cmp(time,time),
305 FUNCTION 2 gin_extract_value_time(time, internal),
306 FUNCTION 3 gin_extract_query_time(time, internal, int2, internal, internal),
307 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
308 FUNCTION 5 gin_compare_prefix_time(time,time,int2, internal),
309 STORAGE time;
311 CREATE OR REPLACE FUNCTION gin_extract_value_timetz(timetz, internal)
312 RETURNS internal
313 AS 'MODULE_PATHNAME'
314 LANGUAGE C STRICT IMMUTABLE;
316 CREATE OR REPLACE FUNCTION gin_compare_prefix_timetz(timetz, timetz, int2, internal)
317 RETURNS int4
318 AS 'MODULE_PATHNAME'
319 LANGUAGE C STRICT IMMUTABLE;
321 CREATE OR REPLACE FUNCTION gin_extract_query_timetz(timetz, internal, int2, internal, internal)
322 RETURNS internal
323 AS 'MODULE_PATHNAME'
324 LANGUAGE C STRICT IMMUTABLE;
326 CREATE OPERATOR CLASS timetz_ops
327 DEFAULT FOR TYPE timetz USING gin
329 OPERATOR 1 <,
330 OPERATOR 2 <=,
331 OPERATOR 3 =,
332 OPERATOR 4 >=,
333 OPERATOR 5 >,
334 FUNCTION 1 timetz_cmp(timetz,timetz),
335 FUNCTION 2 gin_extract_value_timetz(timetz, internal),
336 FUNCTION 3 gin_extract_query_timetz(timetz, internal, int2, internal, internal),
337 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
338 FUNCTION 5 gin_compare_prefix_timetz(timetz,timetz,int2, internal),
339 STORAGE timetz;
341 CREATE OR REPLACE FUNCTION gin_extract_value_date(date, internal)
342 RETURNS internal
343 AS 'MODULE_PATHNAME'
344 LANGUAGE C STRICT IMMUTABLE;
346 CREATE OR REPLACE FUNCTION gin_compare_prefix_date(date, date, int2, internal)
347 RETURNS int4
348 AS 'MODULE_PATHNAME'
349 LANGUAGE C STRICT IMMUTABLE;
351 CREATE OR REPLACE FUNCTION gin_extract_query_date(date, internal, int2, internal, internal)
352 RETURNS internal
353 AS 'MODULE_PATHNAME'
354 LANGUAGE C STRICT IMMUTABLE;
356 CREATE OPERATOR CLASS date_ops
357 DEFAULT FOR TYPE date USING gin
359 OPERATOR 1 <,
360 OPERATOR 2 <=,
361 OPERATOR 3 =,
362 OPERATOR 4 >=,
363 OPERATOR 5 >,
364 FUNCTION 1 date_cmp(date,date),
365 FUNCTION 2 gin_extract_value_date(date, internal),
366 FUNCTION 3 gin_extract_query_date(date, internal, int2, internal, internal),
367 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
368 FUNCTION 5 gin_compare_prefix_date(date,date,int2, internal),
369 STORAGE date;
371 CREATE OR REPLACE FUNCTION gin_extract_value_interval(interval, internal)
372 RETURNS internal
373 AS 'MODULE_PATHNAME'
374 LANGUAGE C STRICT IMMUTABLE;
376 CREATE OR REPLACE FUNCTION gin_compare_prefix_interval(interval, interval, int2, internal)
377 RETURNS int4
378 AS 'MODULE_PATHNAME'
379 LANGUAGE C STRICT IMMUTABLE;
381 CREATE OR REPLACE FUNCTION gin_extract_query_interval(interval, internal, int2, internal, internal)
382 RETURNS internal
383 AS 'MODULE_PATHNAME'
384 LANGUAGE C STRICT IMMUTABLE;
386 CREATE OPERATOR CLASS interval_ops
387 DEFAULT FOR TYPE interval USING gin
389 OPERATOR 1 <,
390 OPERATOR 2 <=,
391 OPERATOR 3 =,
392 OPERATOR 4 >=,
393 OPERATOR 5 >,
394 FUNCTION 1 interval_cmp(interval,interval),
395 FUNCTION 2 gin_extract_value_interval(interval, internal),
396 FUNCTION 3 gin_extract_query_interval(interval, internal, int2, internal, internal),
397 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
398 FUNCTION 5 gin_compare_prefix_interval(interval,interval,int2, internal),
399 STORAGE interval;
401 CREATE OR REPLACE FUNCTION gin_extract_value_macaddr(macaddr, internal)
402 RETURNS internal
403 AS 'MODULE_PATHNAME'
404 LANGUAGE C STRICT IMMUTABLE;
406 CREATE OR REPLACE FUNCTION gin_compare_prefix_macaddr(macaddr, macaddr, int2, internal)
407 RETURNS int4
408 AS 'MODULE_PATHNAME'
409 LANGUAGE C STRICT IMMUTABLE;
411 CREATE OR REPLACE FUNCTION gin_extract_query_macaddr(macaddr, internal, int2, internal, internal)
412 RETURNS internal
413 AS 'MODULE_PATHNAME'
414 LANGUAGE C STRICT IMMUTABLE;
416 CREATE OPERATOR CLASS macaddr_ops
417 DEFAULT FOR TYPE macaddr USING gin
419 OPERATOR 1 <,
420 OPERATOR 2 <=,
421 OPERATOR 3 =,
422 OPERATOR 4 >=,
423 OPERATOR 5 >,
424 FUNCTION 1 macaddr_cmp(macaddr,macaddr),
425 FUNCTION 2 gin_extract_value_macaddr(macaddr, internal),
426 FUNCTION 3 gin_extract_query_macaddr(macaddr, internal, int2, internal, internal),
427 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
428 FUNCTION 5 gin_compare_prefix_macaddr(macaddr,macaddr,int2, internal),
429 STORAGE macaddr;
431 CREATE OR REPLACE FUNCTION gin_extract_value_inet(inet, internal)
432 RETURNS internal
433 AS 'MODULE_PATHNAME'
434 LANGUAGE C STRICT IMMUTABLE;
436 CREATE OR REPLACE FUNCTION gin_compare_prefix_inet(inet, inet, int2, internal)
437 RETURNS int4
438 AS 'MODULE_PATHNAME'
439 LANGUAGE C STRICT IMMUTABLE;
441 CREATE OR REPLACE FUNCTION gin_extract_query_inet(inet, internal, int2, internal, internal)
442 RETURNS internal
443 AS 'MODULE_PATHNAME'
444 LANGUAGE C STRICT IMMUTABLE;
446 CREATE OPERATOR CLASS inet_ops
447 DEFAULT FOR TYPE inet USING gin
449 OPERATOR 1 <,
450 OPERATOR 2 <=,
451 OPERATOR 3 =,
452 OPERATOR 4 >=,
453 OPERATOR 5 >,
454 FUNCTION 1 network_cmp(inet,inet),
455 FUNCTION 2 gin_extract_value_inet(inet, internal),
456 FUNCTION 3 gin_extract_query_inet(inet, internal, int2, internal, internal),
457 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
458 FUNCTION 5 gin_compare_prefix_inet(inet,inet,int2, internal),
459 STORAGE inet;
461 CREATE OR REPLACE FUNCTION gin_extract_value_cidr(cidr, internal)
462 RETURNS internal
463 AS 'MODULE_PATHNAME'
464 LANGUAGE C STRICT IMMUTABLE;
466 CREATE OR REPLACE FUNCTION gin_compare_prefix_cidr(cidr, cidr, int2, internal)
467 RETURNS int4
468 AS 'MODULE_PATHNAME'
469 LANGUAGE C STRICT IMMUTABLE;
471 CREATE OR REPLACE FUNCTION gin_extract_query_cidr(cidr, internal, int2, internal, internal)
472 RETURNS internal
473 AS 'MODULE_PATHNAME'
474 LANGUAGE C STRICT IMMUTABLE;
476 CREATE OPERATOR CLASS cidr_ops
477 DEFAULT FOR TYPE cidr USING gin
479 OPERATOR 1 <(inet,inet),
480 OPERATOR 2 <=(inet,inet),
481 OPERATOR 3 =(inet,inet),
482 OPERATOR 4 >=(inet,inet),
483 OPERATOR 5 >(inet,inet),
484 FUNCTION 1 network_cmp(inet,inet),
485 FUNCTION 2 gin_extract_value_cidr(cidr, internal),
486 FUNCTION 3 gin_extract_query_cidr(cidr, internal, int2, internal, internal),
487 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
488 FUNCTION 5 gin_compare_prefix_cidr(cidr,cidr,int2, internal),
489 STORAGE cidr;
491 CREATE OR REPLACE FUNCTION gin_extract_value_text(text, internal)
492 RETURNS internal
493 AS 'MODULE_PATHNAME'
494 LANGUAGE C STRICT IMMUTABLE;
496 CREATE OR REPLACE FUNCTION gin_compare_prefix_text(text, text, int2, internal)
497 RETURNS int4
498 AS 'MODULE_PATHNAME'
499 LANGUAGE C STRICT IMMUTABLE;
501 CREATE OR REPLACE FUNCTION gin_extract_query_text(text, internal, int2, internal, internal)
502 RETURNS internal
503 AS 'MODULE_PATHNAME'
504 LANGUAGE C STRICT IMMUTABLE;
506 CREATE OPERATOR CLASS text_ops
507 DEFAULT FOR TYPE text USING gin
509 OPERATOR 1 <,
510 OPERATOR 2 <=,
511 OPERATOR 3 =,
512 OPERATOR 4 >=,
513 OPERATOR 5 >,
514 FUNCTION 1 bttextcmp(text,text),
515 FUNCTION 2 gin_extract_value_text(text, internal),
516 FUNCTION 3 gin_extract_query_text(text, internal, int2, internal, internal),
517 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
518 FUNCTION 5 gin_compare_prefix_text(text,text,int2, internal),
519 STORAGE text;
521 CREATE OPERATOR CLASS varchar_ops
522 DEFAULT FOR TYPE varchar USING gin
524 OPERATOR 1 <(text,text),
525 OPERATOR 2 <=(text,text),
526 OPERATOR 3 =(text,text),
527 OPERATOR 4 >=(text,text),
528 OPERATOR 5 >(text,text),
529 FUNCTION 1 bttextcmp(text,text),
530 FUNCTION 2 gin_extract_value_text(text, internal),
531 FUNCTION 3 gin_extract_query_text(text, internal, int2, internal, internal),
532 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
533 FUNCTION 5 gin_compare_prefix_text(text,text,int2, internal),
534 STORAGE varchar;
536 CREATE OR REPLACE FUNCTION gin_extract_value_char("char", internal)
537 RETURNS internal
538 AS 'MODULE_PATHNAME'
539 LANGUAGE C STRICT IMMUTABLE;
541 CREATE OR REPLACE FUNCTION gin_compare_prefix_char("char", "char", int2, internal)
542 RETURNS int4
543 AS 'MODULE_PATHNAME'
544 LANGUAGE C STRICT IMMUTABLE;
546 CREATE OR REPLACE FUNCTION gin_extract_query_char("char", internal, int2, internal, internal)
547 RETURNS internal
548 AS 'MODULE_PATHNAME'
549 LANGUAGE C STRICT IMMUTABLE;
551 CREATE OPERATOR CLASS char_ops
552 DEFAULT FOR TYPE "char" USING gin
554 OPERATOR 1 <,
555 OPERATOR 2 <=,
556 OPERATOR 3 =,
557 OPERATOR 4 >=,
558 OPERATOR 5 >,
559 FUNCTION 1 btcharcmp("char","char"),
560 FUNCTION 2 gin_extract_value_char("char", internal),
561 FUNCTION 3 gin_extract_query_char("char", internal, int2, internal, internal),
562 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
563 FUNCTION 5 gin_compare_prefix_char("char","char",int2, internal),
564 STORAGE "char";
566 CREATE OR REPLACE FUNCTION gin_extract_value_bytea(bytea, internal)
567 RETURNS internal
568 AS 'MODULE_PATHNAME'
569 LANGUAGE C STRICT IMMUTABLE;
571 CREATE OR REPLACE FUNCTION gin_compare_prefix_bytea(bytea, bytea, int2, internal)
572 RETURNS int4
573 AS 'MODULE_PATHNAME'
574 LANGUAGE C STRICT IMMUTABLE;
576 CREATE OR REPLACE FUNCTION gin_extract_query_bytea(bytea, internal, int2, internal, internal)
577 RETURNS internal
578 AS 'MODULE_PATHNAME'
579 LANGUAGE C STRICT IMMUTABLE;
581 CREATE OPERATOR CLASS bytea_ops
582 DEFAULT FOR TYPE bytea USING gin
584 OPERATOR 1 <,
585 OPERATOR 2 <=,
586 OPERATOR 3 =,
587 OPERATOR 4 >=,
588 OPERATOR 5 >,
589 FUNCTION 1 byteacmp(bytea,bytea),
590 FUNCTION 2 gin_extract_value_bytea(bytea, internal),
591 FUNCTION 3 gin_extract_query_bytea(bytea, internal, int2, internal, internal),
592 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
593 FUNCTION 5 gin_compare_prefix_bytea(bytea,bytea,int2, internal),
594 STORAGE bytea;
596 CREATE OR REPLACE FUNCTION gin_extract_value_bit(bit, internal)
597 RETURNS internal
598 AS 'MODULE_PATHNAME'
599 LANGUAGE C STRICT IMMUTABLE;
601 CREATE OR REPLACE FUNCTION gin_compare_prefix_bit(bit, bit, int2, internal)
602 RETURNS int4
603 AS 'MODULE_PATHNAME'
604 LANGUAGE C STRICT IMMUTABLE;
606 CREATE OR REPLACE FUNCTION gin_extract_query_bit(bit, internal, int2, internal, internal)
607 RETURNS internal
608 AS 'MODULE_PATHNAME'
609 LANGUAGE C STRICT IMMUTABLE;
611 CREATE OPERATOR CLASS bit_ops
612 DEFAULT FOR TYPE bit USING gin
614 OPERATOR 1 <,
615 OPERATOR 2 <=,
616 OPERATOR 3 =,
617 OPERATOR 4 >=,
618 OPERATOR 5 >,
619 FUNCTION 1 bitcmp(bit,bit),
620 FUNCTION 2 gin_extract_value_bit(bit, internal),
621 FUNCTION 3 gin_extract_query_bit(bit, internal, int2, internal, internal),
622 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
623 FUNCTION 5 gin_compare_prefix_bit(bit,bit,int2, internal),
624 STORAGE bit;
626 CREATE OR REPLACE FUNCTION gin_extract_value_varbit(varbit, internal)
627 RETURNS internal
628 AS 'MODULE_PATHNAME'
629 LANGUAGE C STRICT IMMUTABLE;
631 CREATE OR REPLACE FUNCTION gin_compare_prefix_varbit(varbit, varbit, int2, internal)
632 RETURNS int4
633 AS 'MODULE_PATHNAME'
634 LANGUAGE C STRICT IMMUTABLE;
636 CREATE OR REPLACE FUNCTION gin_extract_query_varbit(varbit, internal, int2, internal, internal)
637 RETURNS internal
638 AS 'MODULE_PATHNAME'
639 LANGUAGE C STRICT IMMUTABLE;
641 CREATE OPERATOR CLASS varbit_ops
642 DEFAULT FOR TYPE varbit USING gin
644 OPERATOR 1 <,
645 OPERATOR 2 <=,
646 OPERATOR 3 =,
647 OPERATOR 4 >=,
648 OPERATOR 5 >,
649 FUNCTION 1 varbitcmp(varbit,varbit),
650 FUNCTION 2 gin_extract_value_varbit(varbit, internal),
651 FUNCTION 3 gin_extract_query_varbit(varbit, internal, int2, internal, internal),
652 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
653 FUNCTION 5 gin_compare_prefix_varbit(varbit,varbit,int2, internal),
654 STORAGE varbit;
656 CREATE OR REPLACE FUNCTION gin_extract_value_numeric(numeric, internal)
657 RETURNS internal
658 AS 'MODULE_PATHNAME'
659 LANGUAGE C STRICT IMMUTABLE;
661 CREATE OR REPLACE FUNCTION gin_compare_prefix_numeric(numeric, numeric, int2, internal)
662 RETURNS int4
663 AS 'MODULE_PATHNAME'
664 LANGUAGE C STRICT IMMUTABLE;
666 CREATE OR REPLACE FUNCTION gin_extract_query_numeric(numeric, internal, int2, internal, internal)
667 RETURNS internal
668 AS 'MODULE_PATHNAME'
669 LANGUAGE C STRICT IMMUTABLE;
671 CREATE OR REPLACE FUNCTION gin_numeric_cmp(numeric, numeric)
672 RETURNS int4
673 AS 'MODULE_PATHNAME'
674 LANGUAGE C STRICT IMMUTABLE;
676 CREATE OPERATOR CLASS numeric_ops
677 DEFAULT FOR TYPE numeric USING gin
679 OPERATOR 1 <,
680 OPERATOR 2 <=,
681 OPERATOR 3 =,
682 OPERATOR 4 >=,
683 OPERATOR 5 >,
684 FUNCTION 1 gin_numeric_cmp(numeric,numeric),
685 FUNCTION 2 gin_extract_value_numeric(numeric, internal),
686 FUNCTION 3 gin_extract_query_numeric(numeric, internal, int2, internal, internal),
687 FUNCTION 4 gin_btree_consistent(internal, int2, anyelement, int4, internal, internal),
688 FUNCTION 5 gin_compare_prefix_numeric(numeric,numeric,int2, internal),
689 STORAGE numeric;