Commit 37a71f90 authored by Tom Lane's avatar Tom Lane

Fix SERIAL columns, which Thomas inadvertently broke parsing of.

Revised code probably accepts some silly combinations, but that's better
than not accepting valid ones.
parent 751a14e6
......@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.146 2000/02/19 19:37:21 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.147 2000/02/20 02:14:58 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
......@@ -1047,7 +1047,7 @@ columnDef: ColId Typename ColQualifier opt_collate
$$ = (Node *)n;
}
| ColId SERIAL PrimaryKey
| ColId SERIAL ColQualifier opt_collate
{
ColumnDef *n = makeNode(ColumnDef);
n->colname = $1;
......@@ -1060,7 +1060,11 @@ columnDef: ColId Typename ColQualifier opt_collate
#endif
n->is_not_null = TRUE;
n->is_sequence = TRUE;
n->constraints = lcons($3, NIL);
n->constraints = $3;
if ($4 != NULL)
elog(NOTICE,"CREATE TABLE/COLLATE %s not yet implemented"
"; clause ignored", $4);
$$ = (Node *)n;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment