Treat plain 'BIT' as 'BIT(1)'.
authorPeter Eisentraut
Sat, 18 Nov 2000 16:17:20 +0000 (16:17 +0000)
committerPeter Eisentraut
Sat, 18 Nov 2000 16:17:20 +0000 (16:17 +0000)
src/backend/parser/analyze.c

index 478ae973e5c8790cfd584ba80efcf1f4750fe527..5c5942e4b7c10cd5f7b46a2970c8bd1eb2d7bb1b 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: analyze.c,v 1.166 2000/11/16 22:30:28 tgl Exp $
+ * $Id: analyze.c,v 1.167 2000/11/18 16:17:20 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2891,6 +2891,10 @@ transformColumnType(ParseState *pstate, ColumnDef *column)
                typename->typmod = VARHDRSZ +
                    ((NUMERIC_DEFAULT_PRECISION << 16) | NUMERIC_DEFAULT_SCALE);
                break;
+           case ZPBITOID:
+               /* 'bit' -> 'bit(1)' */
+               typename->typmod = 1;
+               break;
        }
    }