1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +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

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.186 2001/05/18 21:24:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.187 2001/05/22 16:37:15 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -3086,7 +3086,7 @@ transformColumnType(ParseState *pstate, ColumnDef *column)
typename->typmod = VARHDRSZ +
((NUMERIC_DEFAULT_PRECISION << 16) | NUMERIC_DEFAULT_SCALE);
break;
case ZPBITOID:
case BITOID:
/* 'bit' -> 'bit(1)' */
typename->typmod = 1;
break;