Skip to content

Commit 27d0d1a

Browse files
author
Thomas G. Lockhart
committed
Add SQL92 reserved words for primary and foreign keys.
Add keywords for national character types. Shorted date/time keyword token names for convenience. Add SQL3 reserved words TRUE and FALSE.
1 parent 60fee0d commit 27d0d1a

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

src/backend/parser/keywords.c

Lines changed: 28 additions & 11 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.19 1997/09/24 17:49:56 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.20 1997/10/25 05:44:11 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -33,6 +33,7 @@ static ScanKeyword ScanKeywords[] = {
3333
/* name value */
3434
{"abort", ABORT_TRANS},
3535
{"acl", ACL},
36+
{"action", ACTION},
3637
{"add", ADD},
3738
{"after", AFTER},
3839
{"aggregate", AGGREGATE},
@@ -53,12 +54,15 @@ static ScanKeyword ScanKeywords[] = {
5354
{"binary", BINARY},
5455
{"both", BOTH},
5556
{"by", BY},
57+
{"cascade", CASCADE},
5658
{"cast", CAST},
5759
{"change", CHANGE},
60+
{"char", CHAR},
5861
{"character", CHARACTER},
5962
{"check", CHECK},
6063
{"close", CLOSE},
6164
{"cluster", CLUSTER},
65+
{"collate", COLLATE},
6266
{"column", COLUMN},
6367
{"commit", COMMIT},
6468
{"constraint", CONSTRAINT},
@@ -69,9 +73,10 @@ static ScanKeyword ScanKeywords[] = {
6973
{"current_date", CURRENT_DATE},
7074
{"current_time", CURRENT_TIME},
7175
{"current_timestamp", CURRENT_TIMESTAMP},
76+
{"current_user", CURRENT_USER},
7277
{"cursor", CURSOR},
7378
{"database", DATABASE},
74-
{"day", DAYINTERVAL},
79+
{"day", DAY_P},
7580
{"decimal", DECIMAL},
7681
{"declare", DECLARE},
7782
{"default", DEFAULT},
@@ -88,9 +93,11 @@ static ScanKeyword ScanKeywords[] = {
8893
{"explain", EXPLAIN},
8994
{"extend", EXTEND},
9095
{"extract", EXTRACT},
96+
{"false", FALSE_P},
9197
{"fetch", FETCH},
9298
{"float", FLOAT},
9399
{"for", FOR},
100+
{"foreign", FOREIGN},
94101
{"forward", FORWARD},
95102
{"from", FROM},
96103
{"full", FULL},
@@ -99,18 +106,19 @@ static ScanKeyword ScanKeywords[] = {
99106
{"group", GROUP},
100107
{"having", HAVING},
101108
{"heavy", HEAVY},
102-
{"hour", HOURINTERVAL},
109+
{"hour", HOUR_P},
103110
{"in", IN},
104111
{"index", INDEX},
105112
{"inherits", INHERITS},
106-
{"inner", INNERJOIN},
113+
{"inner", INNER_P},
107114
{"insert", INSERT},
108115
{"instead", INSTEAD},
109116
{"interval", INTERVAL},
110117
{"into", INTO},
111118
{"is", IS},
112119
{"isnull", ISNULL},
113120
{"join", JOIN},
121+
{"key", KEY},
114122
{"language", LANGUAGE},
115123
{"leading", LEADING},
116124
{"left", LEFT},
@@ -119,33 +127,40 @@ static ScanKeyword ScanKeywords[] = {
119127
{"listen", LISTEN},
120128
{"load", LOAD},
121129
{"local", LOCAL},
130+
{"match", MATCH},
122131
{"merge", MERGE},
123-
{"minute", MINUTEINTERVAL},
124-
{"month", MONTHINTERVAL},
132+
{"minute", MINUTE_P},
133+
{"month", MONTH_P},
125134
{"move", MOVE},
135+
{"national", NATIONAL},
126136
{"natural", NATURAL},
137+
{"nchar", NCHAR},
127138
{"new", NEW},
128139
{"none", NONE},
140+
{"no", NO},
129141
{"not", NOT},
130142
{"nothing", NOTHING},
131143
{"notify", NOTIFY},
132144
{"notnull", NOTNULL},
133-
{"null", PNULL},
145+
{"null", NULL_P},
134146
{"numeric", NUMERIC},
135147
{"oids", OIDS},
136148
{"on", ON},
137149
{"operator", OPERATOR},
138150
{"option", OPTION},
139151
{"or", OR},
140152
{"order", ORDER},
141-
{"outer", OUTERJOIN},
153+
{"outer", OUTER_P},
154+
{"partial", PARTIAL},
142155
{"position", POSITION},
143156
{"precision", PRECISION},
157+
{"primary", PRIMARY},
144158
{"privileges", PRIVILEGES},
145159
{"procedure", PROCEDURE},
146160
{"public", PUBLIC},
147161
{"purge", PURGE},
148162
{"recipe", RECIPE},
163+
{"references", REFERENCES},
149164
{"rename", RENAME},
150165
{"replace", REPLACE},
151166
{"reset", RESET},
@@ -155,7 +170,7 @@ static ScanKeyword ScanKeywords[] = {
155170
{"right", RIGHT},
156171
{"rollback", ROLLBACK},
157172
{"rule", RULE},
158-
{"second", SECONDINTERVAL},
173+
{"second", SECOND_P},
159174
{"select", SELECT},
160175
{"sequence", SEQUENCE},
161176
{"set", SET},
@@ -172,21 +187,23 @@ static ScanKeyword ScanKeywords[] = {
172187
{"transaction", TRANSACTION},
173188
{"trigger", TRIGGER},
174189
{"trim", TRIM},
175-
{"type", P_TYPE},
190+
{"true", TRUE_P},
191+
{"type", TYPE_P},
176192
{"union", UNION},
177193
{"unique", UNIQUE},
178194
{"update", UPDATE},
179195
{"using", USING},
180196
{"vacuum", VACUUM},
181197
{"values", VALUES},
198+
{"varchar", VARCHAR},
182199
{"varying", VARYING},
183200
{"verbose", VERBOSE},
184201
{"version", VERSION},
185202
{"view", VIEW},
186203
{"where", WHERE},
187204
{"with", WITH},
188205
{"work", WORK},
189-
{"year", YEARINTERVAL},
206+
{"year", YEAR_P},
190207
{"zone", ZONE},
191208
};
192209

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy