From c62736cc37f6812d1ebb41ea5a86ffe60564a1f0 Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Mon, 29 Jul 2013 16:38:01 +0100 Subject: Add SQL Standard WITH ORDINALITY support for UNNEST (and any other SRF) Author: Andrew Gierth, David Fetter Reviewers: Dean Rasheed, Jeevan Chalke, Stephen Frost --- src/backend/parser/parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/backend/parser/parser.c') diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c index b8ec7904666..541d3643a10 100644 --- a/src/backend/parser/parser.c +++ b/src/backend/parser/parser.c @@ -133,7 +133,7 @@ base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp, core_yyscan_t yyscanner) case WITH: /* - * WITH TIME must be reduced to one token + * WITH TIME and WITH ORDINALITY must each be reduced to one token */ cur_yylval = lvalp->core_yystype; cur_yylloc = *llocp; @@ -143,6 +143,9 @@ base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp, core_yyscan_t yyscanner) case TIME: cur_token = WITH_TIME; break; + case ORDINALITY: + cur_token = WITH_ORDINALITY; + break; default: /* save the lookahead token for next time */ yyextra->lookahead_token = next_token; -- cgit v1.2.3