1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Overdue code review for ALTER SEQUENCE patch. Don't generate illegal Node

tree for CYCLE option; don't assume zeros are invalid values for sequence
fields other than increment_by; don't reset cache_value when not told to;
simplify code for testing whether to apply defaults.
This commit is contained in:
Tom Lane
2003-11-24 16:54:07 +00:00
parent b3d72d3ec5
commit 1c5f223e25
2 changed files with 68 additions and 51 deletions

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.438 2003/11/21 22:32:49 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.439 2003/11/24 16:54:07 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -1926,11 +1926,11 @@ OptSeqElem: CACHE NumericOnly
}
| CYCLE
{
$$ = makeDefElem("cycle", (Node *)true);
$$ = makeDefElem("cycle", (Node *)makeInteger(TRUE));
}
| NO CYCLE
{
$$ = makeDefElem("cycle", (Node *)false);
$$ = makeDefElem("cycle", (Node *)makeInteger(FALSE));
}
| INCREMENT opt_by NumericOnly
{