Skip to content

Commit 05eb632

Browse files
author
Thomas G. Lockhart
committed
Add more reserved words, mostly for SQL92 compliance.
Include reserved words for string handling, outer joins, and unions.
1 parent 559a287 commit 05eb632

File tree

1 file changed

+45
-18
lines changed

1 file changed

+45
-18
lines changed

src/backend/parser/keywords.c

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.12 1997/08/22 14:33:21 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.13 1997/09/01 05:53:31 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -35,7 +35,7 @@ static ScanKeyword ScanKeywords[] = {
3535
{ "acl", ACL },
3636
{ "add", ADD },
3737
{ "after", AFTER },
38-
{ "aggregate", AGGREGATE },
38+
{ "aggregate", AGGREGATE },
3939
{ "all", ALL },
4040
{ "alter", ALTER },
4141
{ "analyze", ANALYZE },
@@ -44,13 +44,14 @@ static ScanKeyword ScanKeywords[] = {
4444
{ "archIve", ARCHIVE }, /* XXX crooked: I < _ */
4545
{ "arch_store", ARCH_STORE },
4646
{ "archive", ARCHIVE }, /* XXX crooked: i > _ */
47-
{ "as", AS },
48-
{ "asc", ASC },
47+
{ "as", AS },
48+
{ "asc", ASC },
4949
{ "backward", BACKWARD },
5050
{ "before", BEFORE },
5151
{ "begin", BEGIN_TRANS },
5252
{ "between", BETWEEN },
5353
{ "binary", BINARY },
54+
{ "both", BOTH },
5455
{ "by", BY },
5556
{ "cast", CAST },
5657
{ "change", CHANGE },
@@ -62,70 +63,89 @@ static ScanKeyword ScanKeywords[] = {
6263
{ "constraint", CONSTRAINT },
6364
{ "copy", COPY },
6465
{ "create", CREATE },
66+
{ "cross", CROSS },
6567
{ "current", CURRENT },
6668
{ "cursor", CURSOR },
6769
{ "database", DATABASE },
70+
{ "day", DAYINTERVAL },
6871
{ "declare", DECLARE },
6972
{ "default", DEFAULT },
7073
{ "delete", DELETE },
71-
{ "delimiters", DELIMITERS },
74+
{ "delimiters", DELIMITERS },
7275
{ "desc", DESC },
7376
{ "distinct", DISTINCT },
7477
{ "do", DO },
7578
{ "drop", DROP },
7679
{ "end", END_TRANS },
7780
{ "execute", EXECUTE },
81+
{ "exists", EXISTS },
7882
{ "explain", EXPLAIN },
7983
{ "extend", EXTEND },
84+
{ "extract", EXTRACT },
8085
{ "fetch", FETCH },
8186
{ "for", FOR },
8287
{ "forward", FORWARD },
8388
{ "from", FROM },
89+
{ "full", FULL },
8490
{ "function", FUNCTION },
85-
{ "grant", GRANT },
91+
{ "grant", GRANT },
8692
{ "group", GROUP },
8793
{ "having", HAVING },
8894
{ "heavy", HEAVY },
95+
{ "hour", HOURINTERVAL },
8996
{ "in", IN },
9097
{ "index", INDEX },
9198
{ "inherits", INHERITS },
99+
{ "inner", INNERJOIN },
92100
{ "insert", INSERT },
93101
{ "instead", INSTEAD },
102+
{ "interval", INTERVAL },
94103
{ "into", INTO },
95104
{ "is", IS },
96-
{ "isnull", ISNULL },
105+
{ "isnull", ISNULL },
106+
{ "join", JOIN },
97107
{ "language", LANGUAGE },
108+
{ "leading", LEADING },
109+
{ "left", LEFT },
98110
{ "light", LIGHT },
99111
{ "like", LIKE },
100-
{ "listen", LISTEN },
101-
{ "load", LOAD },
112+
{ "listen", LISTEN },
113+
{ "load", LOAD },
114+
{ "local", LOCAL },
102115
{ "merge", MERGE },
116+
{ "minute", MINUTEINTERVAL },
117+
{ "month", MONTHINTERVAL },
103118
{ "move", MOVE },
119+
{ "natural", NATURAL },
104120
{ "new", NEW },
105121
{ "none", NONE },
106122
{ "not", NOT },
107-
{ "nothing", NOTHING },
108-
{ "notify", NOTIFY },
109-
{ "notnull", NOTNULL },
123+
{ "nothing", NOTHING },
124+
{ "notify", NOTIFY },
125+
{ "notnull", NOTNULL },
110126
{ "null", PNULL },
111127
{ "oids", OIDS },
112128
{ "on", ON },
113129
{ "operator", OPERATOR },
114-
{ "option", OPTION },
130+
{ "option", OPTION },
115131
{ "or", OR },
116132
{ "order", ORDER },
117-
{ "privileges", PRIVILEGES },
118-
{ "public", PUBLIC },
133+
{ "outer", OUTERJOIN },
134+
{ "position", POSITION },
135+
{ "privileges", PRIVILEGES },
136+
{ "public", PUBLIC },
119137
{ "purge", PURGE },
120-
{ "recipe", RECIPE },
138+
{ "recipe", RECIPE },
121139
{ "rename", RENAME },
122140
{ "replace", REPLACE },
123141
{ "reset", RESET },
124142
{ "retrieve", RETRIEVE },
125143
{ "returns", RETURNS },
126-
{ "revoke", REVOKE },
144+
{ "revoke", REVOKE },
145+
{ "right", RIGHT },
127146
{ "rollback", ROLLBACK },
128147
{ "rule", RULE },
148+
{ "second", SECONDINTERVAL },
129149
{ "select", SELECT },
130150
{ "sequence", SEQUENCE },
131151
{ "set", SET },
@@ -134,11 +154,16 @@ static ScanKeyword ScanKeywords[] = {
134154
{ "stdin", STDIN },
135155
{ "stdout", STDOUT },
136156
{ "store", STORE },
157+
{ "substring", SUBSTRING },
137158
{ "table", TABLE },
159+
{ "time", TIME },
138160
{ "to", TO },
139161
{ "transaction", TRANSACTION },
162+
{ "trailing", TRAILING },
163+
{ "trim", TRIM },
140164
{ "type", P_TYPE },
141-
{ "unique", UNIQUE },
165+
{ "union", UNION },
166+
{ "unique", UNIQUE },
142167
{ "update", UPDATE },
143168
{ "using", USING },
144169
{ "vacuum", VACUUM },
@@ -149,6 +174,8 @@ static ScanKeyword ScanKeywords[] = {
149174
{ "where", WHERE },
150175
{ "with", WITH },
151176
{ "work", WORK },
177+
{ "year", YEARINTERVAL },
178+
{ "zone", ZONE },
152179
};
153180

154181
ScanKeyword *

0 commit comments

Comments
 (0)