Skip to content

Commit b503cbe

Browse files
committed
First pass at integrating BIT and BIT VARYING code from Adriaan Joubert.
Update functions to new-style fmgr, make BIT and VARBIT be binary- equivalent, add entries to allow these types to be btree indexed, correct a few bugs. BIT/VARBIT are now toastable, too. NOTE: initdb forced due to catalog updates.
1 parent d594eec commit b503cbe

File tree

11 files changed

+887
-696
lines changed

11 files changed

+887
-696
lines changed

src/backend/utils/adt/varbit.c

Lines changed: 607 additions & 451 deletions
Large diffs are not rendered by default.

src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $Id: catversion.h,v 1.41 2000/08/08 15:42:33 tgl Exp $
40+
* $Id: catversion.h,v 1.42 2000/08/21 04:48:51 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 200008071
56+
#define CATALOG_VERSION_NO 200008201
5757

5858
#endif

src/include/catalog/pg_amop.h

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_amop.h,v 1.35 2000/07/30 22:13:59 tgl Exp $
11+
* $Id: pg_amop.h,v 1.36 2000/08/21 04:48:51 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -259,7 +259,6 @@ DATA(insert OID = 0 ( 403 1114 1093 3 ));
259259
DATA(insert OID = 0 ( 403 1114 1098 4 ));
260260
DATA(insert OID = 0 ( 403 1114 1097 5 ));
261261

262-
263262
/*
264263
* nbtree time_ops
265264
*/
@@ -350,6 +349,26 @@ DATA(insert OID = 0 ( 403 1690 91 3 ));
350349
DATA(insert OID = 0 ( 403 1690 1695 4 ));
351350
DATA(insert OID = 0 ( 403 1690 59 5 ));
352351

352+
/*
353+
* nbtree bit
354+
*/
355+
356+
DATA(insert OID = 0 ( 403 424 1786 1 ));
357+
DATA(insert OID = 0 ( 403 424 1788 2 ));
358+
DATA(insert OID = 0 ( 403 424 1784 3 ));
359+
DATA(insert OID = 0 ( 403 424 1789 4 ));
360+
DATA(insert OID = 0 ( 403 424 1787 5 ));
361+
362+
/*
363+
* nbtree varbit
364+
*/
365+
366+
DATA(insert OID = 0 ( 403 425 1806 1 ));
367+
DATA(insert OID = 0 ( 403 425 1808 2 ));
368+
DATA(insert OID = 0 ( 403 425 1804 3 ));
369+
DATA(insert OID = 0 ( 403 425 1809 4 ));
370+
DATA(insert OID = 0 ( 403 425 1807 5 ));
371+
353372

354373
/*
355374
* hash table _ops

src/include/catalog/pg_amproc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
13-
* $Id: pg_amproc.h,v 1.24 2000/07/30 22:13:59 tgl Exp $
13+
* $Id: pg_amproc.h,v 1.25 2000/08/21 04:48:51 tgl Exp $
1414
*
1515
* NOTES
1616
* the genbki.sh script reads this file and generates .bki
@@ -99,7 +99,8 @@ DATA(insert OID = 0 (403 652 926 1));
9999
DATA(insert OID = 0 (403 1768 1769 1));
100100
DATA(insert OID = 0 (403 1690 1693 1));
101101
DATA(insert OID = 0 (403 1399 1358 1));
102-
102+
DATA(insert OID = 0 (403 424 1596 1));
103+
DATA(insert OID = 0 (403 425 1672 1));
103104

104105

105106
/* hash */

src/include/catalog/pg_opclass.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_opclass.h,v 1.35 2000/07/30 22:13:59 tgl Exp $
11+
* $Id: pg_opclass.h,v 1.36 2000/08/21 04:48:51 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -119,5 +119,9 @@ DATA(insert OID = 1690 ( bool_ops 16 ));
119119
DESCR("");
120120
DATA(insert OID = 1399 ( timetz_ops 1266 ));
121121
DESCR("");
122+
DATA(insert OID = 424 ( bit_ops 1560 ));
123+
DESCR("");
124+
DATA(insert OID = 425 ( varbit_ops 1562 ));
125+
DESCR("");
122126

123127
#endif /* PG_OPCLASS_H */

src/include/catalog/pg_operator.h

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_operator.h,v 1.80 2000/08/12 05:15:22 tgl Exp $
11+
* $Id: pg_operator.h,v 1.81 2000/08/21 04:48:51 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -306,8 +306,8 @@ DATA(insert OID = 622 ( "<" PGUID 0 b t f 700 700 16 623 625 0 0 float4lt
306306
DATA(insert OID = 623 ( ">" PGUID 0 b t f 700 700 16 622 624 0 0 float4gt scalargtsel scalargtjoinsel ));
307307
DATA(insert OID = 624 ( "<=" PGUID 0 b t f 700 700 16 625 623 0 0 float4le scalarltsel scalarltjoinsel ));
308308
DATA(insert OID = 625 ( ">=" PGUID 0 b t f 700 700 16 624 622 0 0 float4ge scalargtsel scalargtjoinsel ));
309-
DATA(insert OID = 626 ( "!!=" PGUID 0 b t f 23 19 16 0 0 0 0 int4notin - - ));
310-
DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 19 16 0 0 0 0 oidnotin - - ));
309+
DATA(insert OID = 626 ( "!!=" PGUID 0 b t f 23 25 16 0 0 0 0 int4notin - - ));
310+
DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 25 16 0 0 0 0 oidnotin - - ));
311311
DATA(insert OID = 630 ( "<>" PGUID 0 b t f 18 18 16 630 92 0 0 charne neqsel neqjoinsel ));
312312

313313
DATA(insert OID = 631 ( "<" PGUID 0 b t f 18 18 16 633 634 0 0 charlt scalarltsel scalarltjoinsel ));
@@ -711,13 +711,12 @@ DATA(insert OID = 1786 ( "<" PGUID 0 b t f 1560 1560 16 1787 1789 0 0 bitlt
711711
DATA(insert OID = 1787 ( ">" PGUID 0 b t f 1560 1560 16 1786 1788 0 0 bitgt scalargtsel scalargtjoinsel ));
712712
DATA(insert OID = 1788 ( "<=" PGUID 0 b t f 1560 1560 16 1789 1787 0 0 bitle scalarltsel scalarltjoinsel ));
713713
DATA(insert OID = 1789 ( ">=" PGUID 0 b t f 1560 1560 16 1788 1786 0 0 bitge scalargtsel scalargtjoinsel ));
714-
DATA(insert OID = 1790 ( "<=>" PGUID 0 b t f 1560 1560 23 0 0 0 0 bitcmp - - ));
715-
DATA(insert OID = 1791 ( "&" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitand - - ));
716-
DATA(insert OID = 1792 ( "|" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitor - - ));
717-
DATA(insert OID = 1793 ( "^" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitxor - - ));
718-
DATA(insert OID = 1794 ( "~" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitnot - - ));
719-
DATA(insert OID = 1795 ( "<<" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitshiftleft - - ));
720-
DATA(insert OID = 1796 ( ">>" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitshiftright - - ));
714+
DATA(insert OID = 1791 ( "&" PGUID 0 b t f 1560 1560 1560 1791 0 0 0 bitand - - ));
715+
DATA(insert OID = 1792 ( "|" PGUID 0 b t f 1560 1560 1560 1792 0 0 0 bitor - - ));
716+
DATA(insert OID = 1793 ( "^" PGUID 0 b t f 1560 1560 1560 1793 0 0 0 bitxor - - ));
717+
DATA(insert OID = 1794 ( "~" PGUID 0 l t f 0 1560 1560 0 0 0 0 bitnot - - ));
718+
DATA(insert OID = 1795 ( "<<" PGUID 0 b t f 1560 23 1560 0 0 0 0 bitshiftleft - - ));
719+
DATA(insert OID = 1796 ( ">>" PGUID 0 b t f 1560 23 1560 0 0 0 0 bitshiftright - - ));
721720
DATA(insert OID = 1797 ( "||" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitcat - - ));
722721

723722
DATA(insert OID = 1804 ( "=" PGUID 0 b t f 1562 1562 16 1804 1805 1806 1806 varbiteq eqsel eqjoinsel ));
@@ -726,14 +725,6 @@ DATA(insert OID = 1806 ( "<" PGUID 0 b t f 1562 1562 16 1807 1809 0 0 varbit
726725
DATA(insert OID = 1807 ( ">" PGUID 0 b t f 1562 1562 16 1806 1808 0 0 varbitgt scalargtsel scalargtjoinsel ));
727726
DATA(insert OID = 1808 ( "<=" PGUID 0 b t f 1562 1562 16 1809 1807 0 0 varbitle scalarltsel scalarltjoinsel ));
728727
DATA(insert OID = 1809 ( ">=" PGUID 0 b t f 1562 1562 16 1808 1806 0 0 varbitge scalargtsel scalargtjoinsel ));
729-
DATA(insert OID = 1810 ( "<=>" PGUID 0 b t f 1562 1562 23 0 0 0 0 varbitcmp - - ));
730-
DATA(insert OID = 1811 ( "&" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitand - - ));
731-
DATA(insert OID = 1812 ( "|" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitor - - ));
732-
DATA(insert OID = 1813 ( "^" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitxor - - ));
733-
DATA(insert OID = 1814 ( "~" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitnot - - ));
734-
DATA(insert OID = 1815 ( "<<" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitshiftleft - - ));
735-
DATA(insert OID = 1816 ( ">>" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitshiftright - - ));
736-
DATA(insert OID = 1817 ( "||" PGUID 0 b t f 1562 1562 1562 0 0 0 0 varbitcat - - ));
737728

738729
DATA(insert OID = 1862 ( "=" PGUID 0 b t f 21 20 16 1868 1863 95 412 int28eq eqsel eqjoinsel ));
739730
DATA(insert OID = 1863 ( "<>" PGUID 0 b t f 21 20 16 1869 1862 0 0 int28ne neqsel neqjoinsel ));

0 commit comments

Comments
 (0)