summaryrefslogtreecommitdiff
path: root/src/backend/parser/parser.c
diff options
context:
space:
mode:
authorPeter Eisentraut2008-10-28 14:09:45 +0000
committerPeter Eisentraut2008-10-28 14:09:45 +0000
commit8ecd5351691210ba5b536cd4c1251ea1fce090bb (patch)
tree0e31a7de3a1d21e3b46db6435e6a30dc76b52bc5 /src/backend/parser/parser.c
parent53a5026b5cb359ec31e81fa6b20a69b053b87569 (diff)
Add WITH [NO] DATA clause to CREATE TABLE AS, per SQL.
Also, since WITH is now a reserved word, simplify the token merging code to only deal with WITH_TIME. by Tom Lane and myself
Diffstat (limited to 'src/backend/parser/parser.c')
-rw-r--r--src/backend/parser/parser.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c
index 1535318735c..979f4307fdf 100644
--- a/src/backend/parser/parser.c
+++ b/src/backend/parser/parser.c
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.74 2008/08/29 13:02:32 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.75 2008/10/28 14:09:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -129,28 +129,15 @@ filtered_base_yylex(void)
case WITH:
/*
- * WITH CASCADED, LOCAL, or CHECK must be reduced to one token
- *
- * XXX an alternative way is to recognize just WITH_TIME and put
- * the ugliness into the datetime datatype productions instead of
- * WITH CHECK OPTION. However that requires promoting WITH to a
- * fully reserved word. If we ever have to do that anyway
- * (perhaps for SQL99 recursive queries), come back and simplify
- * this code.
+ * WITH TIME must be reduced to one token
*/
cur_yylval = base_yylval;
cur_yylloc = base_yylloc;
next_token = base_yylex();
switch (next_token)
{
- case CASCADED:
- cur_token = WITH_CASCADED;
- break;
- case LOCAL:
- cur_token = WITH_LOCAL;
- break;
- case CHECK:
- cur_token = WITH_CHECK;
+ case TIME:
+ cur_token = WITH_TIME;
break;
default:
/* save the lookahead token for next time */