1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

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.
This commit is contained in:
Peter Eisentraut
2001-05-22 16:37:17 +00:00
parent c84c3d8fea
commit efcecd9eca
14 changed files with 203 additions and 253 deletions

View File

@@ -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.