Skip to content

Commit c114e16

Browse files
committed
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.
1 parent 0975b95 commit c114e16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/parser/gram.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.487 2005/04/07 01:51:38 neilc Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.488 2005/04/23 17:22:16 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -6070,7 +6070,7 @@ opt_interval:
60706070
a_expr: c_expr { $$ = $1; }
60716071
| a_expr TYPECAST Typename
60726072
{ $$ = makeTypeCast($1, $3); }
6073-
| a_expr AT TIME ZONE c_expr
6073+
| a_expr AT TIME ZONE a_expr
60746074
{
60756075
FuncCall *n = makeNode(FuncCall);
60766076
n->funcname = SystemFuncName("timezone");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy