diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-23 17:22:16 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-23 17:22:16 +0000 |
commit | c114e166e5eb6d09b7545863f6bee5806e927101 (patch) | |
tree | 8ec17f47ce198053c389662419c3ed87e360e235 /src | |
parent | 0975b95bc3e4cbaca3497991665fed49f1fe28fb (diff) | |
download | postgresql-c114e166e5eb6d09b7545863f6bee5806e927101.tar.gz postgresql-c114e166e5eb6d09b7545863f6bee5806e927101.zip |
Define the right-hand input of AT TIME ZONE as a full a_expr instead of
c_expr. Perhaps the restriction was once needed to avoid bison errors,
but it seems to work just fine now --- and even generates a slightly
smaller state machine. This change allows examples like
SELECT '13:45'::timetz AT TIME ZONE '-07:00'::interval;
to work without parentheses around the right-hand input.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/gram.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index c33a7e65738..260a2e1b455 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.487 2005/04/07 01:51:38 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.488 2005/04/23 17:22:16 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -6070,7 +6070,7 @@ opt_interval: a_expr: c_expr { $$ = $1; } | a_expr TYPECAST Typename { $$ = makeTypeCast($1, $3); } - | a_expr AT TIME ZONE c_expr + | a_expr AT TIME ZONE a_expr { FuncCall *n = makeNode(FuncCall); n->funcname = SystemFuncName("timezone"); |