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

Commit0f66d79

Browse files
author
Thomas G. Lockhart
committed
Allow both TIME and TYPE as column and table names.
1 parent070d494 commit0f66d79

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎src/backend/parser/gram.y

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.54 1997/10/09 05:00:54 thomas Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.55 1997/10/09 05:35:30 thomas Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -2355,13 +2355,14 @@ typname: txname
23552355
* Allow the following parsing categories:
23562356
* - strings which are not keywords (Id)
23572357
* - some explicit SQL/92 data types (e.g. DOUBLE PRECISION)
2358-
* -TIME as an SQL/92 non-reserved word, but parser keyword
2358+
* -TYPE as an SQL/92 non-reserved word, but parser keyword
23592359
* - other date/time strings (e.g. YEAR)
23602360
* - thomas 1997-10-08
23612361
*/
23622362
txname: Id{ $$ = $1; }
23632363
| DateTime{ $$ = $1; }
23642364
| TIME{ $$ = xlateSqlType("time"); }
2365+
| TYPE_P{ $$ = xlateSqlType("type"); }
23652366
| INTERVAL interval_opts{ $$ = xlateSqlType("interval"); }
23662367
| CHARACTER char_type{ $$ = $2; }
23672368
| DOUBLE PRECISION{ $$ = xlateSqlType("float8"); }
@@ -3141,6 +3142,7 @@ index_name:Id{ $$ = $1; };
31413142
name: Id{ $$ = $1; }
31423143
| DateTime{ $$ = $1; }
31433144
| TIME{ $$ = xlateSqlType("time"); }
3145+
| TYPE_P{ $$ = xlateSqlType("type"); }
31443146
;
31453147

31463148
date:Sconst{ $$ = $1; };
@@ -3190,12 +3192,13 @@ Id: IDENT{ $$ = $1; };
31903192

31913193
/* Column identifier (also used for table identifier)
31923194
* Allow date/time names ("year", etc.) (SQL/92 extension).
3193-
* AllowTIME (SQL/92 non-reserved word).
3195+
* AllowTYPE (SQL/92 non-reserved word).
31943196
* - thomas 1997-10-08
31953197
*/
31963198
ColId:Id{ $$ = $1; }
31973199
| DateTime{ $$ = $1; }
31983200
| TIME{ $$ = "time"; }
3201+
| TYPE_P{ $$ = "type"; }
31993202
;
32003203

32013204
SpecialRuleRelation: CURRENT

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp