Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd63571a

Browse files
author
Thomas G. Lockhart
committed
Allow a string argument to the EXTRACT() function.
This is an extension to the SQL9x standard, but is consistant with usage of the underlying date_part() function used to implement it. Example: EXTRACT('YEAR',...)No impact on regression tests.
1 parent892d46e commitd63571a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/backend/parser/gram.y

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.221 2001/02/18 18:06:10petere Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.222 2001/05/01 01:36:10thomas Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -4986,8 +4986,13 @@ extract_list: extract_arg FROM a_expr
49864986
{$$ = NIL; }
49874987
;
49884988

4989+
/* Allow delimited string SCONST in extract_arg as an SQL extension.
4990+
* - thomas 2001-04-12
4991+
*/
4992+
49894993
extract_arg:datetime{$$ =$1; }
4990-
|IDENT{$$ =$1; }
4994+
|SCONST{$$ =$1; }
4995+
|IDENT{$$ =$1; }
49914996
|TIMEZONE_HOUR{$$ ="tz_hour"; }
49924997
|TIMEZONE_MINUTE{$$ ="tz_minute"; }
49934998
;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp