Allow extract() to accept the same field selectors as date_part(), not just

the ones specified by SQL.
This commit is contained in:
Peter Eisentraut 2001-02-18 18:06:10 +00:00
parent c3b00e7e29
commit 215b90d3d7

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.220 2001/02/09 03:26:28 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.221 2001/02/18 18:06:10 petere Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -4987,6 +4987,7 @@ extract_list: extract_arg FROM a_expr
;
extract_arg: datetime { $$ = $1; }
| IDENT { $$ = $1; }
| TIMEZONE_HOUR { $$ = "tz_hour"; }
| TIMEZONE_MINUTE { $$ = "tz_minute"; }
;