diff options
| author | Thomas G. Lockhart | 1997-10-09 05:35:30 +0000 |
|---|---|---|
| committer | Thomas G. Lockhart | 1997-10-09 05:35:30 +0000 |
| commit | 0f66d799a3a0ef9a96c5f6b2a982eb21accf9172 (patch) | |
| tree | d23e47b6286b42c52161613a767c88fa9b40b265 /src/backend | |
| parent | 070d494464288d65f2ac178785bb675387548d44 (diff) | |
Allow both TIME and TYPE as column and table names.
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/parser/gram.y | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index da98f372491..47ce4aa15d2 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.54 1997/10/09 05:00:54 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.55 1997/10/09 05:35:30 thomas Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -2355,13 +2355,14 @@ typname: txname * Allow the following parsing categories: * - strings which are not keywords (Id) * - some explicit SQL/92 data types (e.g. DOUBLE PRECISION) - * - TIME as an SQL/92 non-reserved word, but parser keyword + * - TYPE as an SQL/92 non-reserved word, but parser keyword * - other date/time strings (e.g. YEAR) * - thomas 1997-10-08 */ txname: Id { $$ = $1; } | DateTime { $$ = $1; } | TIME { $$ = xlateSqlType("time"); } + | TYPE_P { $$ = xlateSqlType("type"); } | INTERVAL interval_opts { $$ = xlateSqlType("interval"); } | CHARACTER char_type { $$ = $2; } | DOUBLE PRECISION { $$ = xlateSqlType("float8"); } @@ -3141,6 +3142,7 @@ index_name: Id { $$ = $1; }; name: Id { $$ = $1; } | DateTime { $$ = $1; } | TIME { $$ = xlateSqlType("time"); } + | TYPE_P { $$ = xlateSqlType("type"); } ; date: Sconst { $$ = $1; }; @@ -3190,12 +3192,13 @@ Id: IDENT { $$ = $1; }; /* Column identifier (also used for table identifier) * Allow date/time names ("year", etc.) (SQL/92 extension). - * Allow TIME (SQL/92 non-reserved word). + * Allow TYPE (SQL/92 non-reserved word). * - thomas 1997-10-08 */ ColId: Id { $$ = $1; } | DateTime { $$ = $1; } | TIME { $$ = "time"; } + | TYPE_P { $$ = "type"; } ; SpecialRuleRelation: CURRENT |
