summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-05-22 16:37:17 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-05-22 16:37:17 +0000
commitefcecd9eca884776137b156a3f1f93c23b98a648 (patch)
treec4b92145e8a25105c68da19114e6952ea7d9241c /src/include
parentc84c3d8fea316359f2336be7287d7037c3b3e46c (diff)
downloadpostgresql-efcecd9eca884776137b156a3f1f93c23b98a648.tar.gz
Make bit and bit varying types reject too long input. (They already tried
to do that, but inconsistently.) Make bit type reject too short input, too, per SQL. Since it no longer zero pads, 'zpbit*' has been renamed to 'bit*' in the source, hence initdb.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_proc.h10
-rw-r--r--src/include/catalog/pg_type.h6
-rw-r--r--src/include/parser/parse_coerce.h8
-rw-r--r--src/include/utils/varbit.h10
5 files changed, 19 insertions, 19 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 2616b4af7d..c38f27c955 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.80 2001/05/21 14:22:17 wieck Exp $
+ * $Id: catversion.h,v 1.81 2001/05/22 16:37:16 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200105211
+#define CATALOG_VERSION_NO 200105221
#endif
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index f905a063c6..6b31f2a4b2 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.186 2001/05/20 20:28:19 tgl Exp $
+ * $Id: pg_proc.h,v 1.187 2001/05/22 16:37:16 petere Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1975,9 +1975,9 @@ DESCR("# points in path");
DATA(insert OID = 1556 ( npoints PGUID 12 f t t t 1 f 23 "604" 100 0 0 100 poly_npoints - ));
DESCR("number of points in polygon");
-DATA(insert OID = 1564 ( zpbit_in PGUID 12 f t t t 1 f 1560 "0" 100 0 0 100 zpbit_in - ));
+DATA(insert OID = 1564 ( bit_in PGUID 12 f t t t 1 f 1560 "0" 100 0 0 100 bit_in - ));
DESCR("(internal)");
-DATA(insert OID = 1565 ( zpbit_out PGUID 12 f t t t 1 f 23 "0" 100 0 0 100 zpbit_out - ));
+DATA(insert OID = 1565 ( bit_out PGUID 12 f t t t 1 f 23 "0" 100 0 0 100 bit_out - ));
DESCR("(internal)");
DATA(insert OID = 1569 ( like PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100 textlike - ));
@@ -2214,9 +2214,9 @@ DESCR("int4 to bitstring");
DATA(insert OID = 1684 ( bittoint4 PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100 bittoint4 - ));
DESCR("bitstring to int4");
-DATA(insert OID = 1685 ( bit PGUID 12 f t t t 2 f 1560 "1560 23" 100 0 0 100 zpbit - ));
+DATA(insert OID = 1685 ( bit PGUID 12 f t t t 2 f 1560 "1560 23" 100 0 0 100 bit - ));
DESCR("adjust bit() to typmod length");
-DATA(insert OID = 1686 ( _bit PGUID 12 f t t t 2 f 1561 "1561 23" 100 0 0 100 _zpbit - ));
+DATA(insert OID = 1686 ( _bit PGUID 12 f t t t 2 f 1561 "1561 23" 100 0 0 100 _bit - ));
DESCR("adjust bit()[] to typmod length");
DATA(insert OID = 1687 ( varbit PGUID 12 f t t t 2 f 1562 "1562 23" 100 0 0 100 varbit - ));
DESCR("adjust varbit() to typmod length");
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 5b330d9ea3..89e5027858 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.106 2001/05/21 14:22:18 wieck Exp $
+ * $Id: pg_type.h,v 1.107 2001/05/22 16:37:17 petere Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -397,9 +397,9 @@ DESCR("hh:mm:ss, ANSI SQL time");
DATA(insert OID = 1270 ( _timetz PGUID -1 -1 f b t \054 0 1266 array_in array_out array_in array_out d x _null_ ));
/* OIDS 1500 - 1599 */
-DATA(insert OID = 1560 ( bit PGUID -1 -1 f b t \054 0 0 zpbit_in zpbit_out zpbit_in zpbit_out i x _null_ ));
+DATA(insert OID = 1560 ( bit PGUID -1 -1 f b t \054 0 0 bit_in bit_out bit_in bit_out i x _null_ ));
DESCR("fixed-length bit string");
-#define ZPBITOID 1560
+#define BITOID 1560
DATA(insert OID = 1561 ( _bit PGUID -1 -1 f b t \054 0 1560 array_in array_out array_in array_out i x _null_ ));
DATA(insert OID = 1562 ( varbit PGUID -1 -1 f b t \054 0 0 varbit_in varbit_out varbit_in varbit_out i x _null_ ));
DESCR("variable-length bit string");
diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h
index d8c7e430cd..f81a3be830 100644
--- a/src/include/parser/parse_coerce.h
+++ b/src/include/parser/parse_coerce.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_coerce.h,v 1.27 2001/03/22 04:00:57 momjian Exp $
+ * $Id: parse_coerce.h,v 1.28 2001/05/22 16:37:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,7 +69,7 @@ typedef enum CATEGORY
|| ((t) == CIRCLEOID) \
|| ((t) == INETOID) \
|| ((t) == CIDROID) \
- || ((t) == ZPBITOID) \
+ || ((t) == BITOID) \
|| ((t) == VARBITOID) )
@@ -101,8 +101,8 @@ typedef enum CATEGORY
|| ((a) == INT4OID && (b) == RELTIMEOID) \
|| ((a) == INETOID && (b) == CIDROID) \
|| ((a) == CIDROID && (b) == INETOID) \
- || ((a) == ZPBITOID && (b) == VARBITOID) \
- || ((a) == VARBITOID && (b) == ZPBITOID))
+ || ((a) == BITOID && (b) == VARBITOID) \
+ || ((a) == VARBITOID && (b) == BITOID))
/* IS_HIGHER_TYPE()
* These types are the most general in each of the type categories.
diff --git a/src/include/utils/varbit.h b/src/include/utils/varbit.h
index 3a1b3f07a0..35172de7be 100644
--- a/src/include/utils/varbit.h
+++ b/src/include/utils/varbit.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: varbit.h,v 1.10 2001/03/22 04:01:15 momjian Exp $
+ * $Id: varbit.h,v 1.11 2001/05/22 16:37:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,12 +61,12 @@ typedef struct
#define BITHIGH 0x80
-extern Datum zpbit_in(PG_FUNCTION_ARGS);
-extern Datum zpbit_out(PG_FUNCTION_ARGS);
+extern Datum bit_in(PG_FUNCTION_ARGS);
+extern Datum bit_out(PG_FUNCTION_ARGS);
extern Datum varbit_in(PG_FUNCTION_ARGS);
extern Datum varbit_out(PG_FUNCTION_ARGS);
-extern Datum zpbit(PG_FUNCTION_ARGS);
-extern Datum _zpbit(PG_FUNCTION_ARGS);
+extern Datum bit(PG_FUNCTION_ARGS);
+extern Datum _bit(PG_FUNCTION_ARGS);
extern Datum varbit(PG_FUNCTION_ARGS);
extern Datum _varbit(PG_FUNCTION_ARGS);
extern Datum biteq(PG_FUNCTION_ARGS);