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.
This commit is contained in:
Tom Lane 2000-02-20 02:14:58 +00:00
parent 751a14e60c
commit 37a71f90b2
1 changed files with 7 additions and 3 deletions

View File

@ -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;
}