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:
@ -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;
|
||||
|
Reference in New Issue
Block a user