Commit 27d0d1a1 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

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.
parent 60fee0d6
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.19 1997/09/24 17:49:56 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.20 1997/10/25 05:44:11 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -33,6 +33,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -33,6 +33,7 @@ static ScanKeyword ScanKeywords[] = {
/* name value */ /* name value */
{"abort", ABORT_TRANS}, {"abort", ABORT_TRANS},
{"acl", ACL}, {"acl", ACL},
{"action", ACTION},
{"add", ADD}, {"add", ADD},
{"after", AFTER}, {"after", AFTER},
{"aggregate", AGGREGATE}, {"aggregate", AGGREGATE},
...@@ -53,12 +54,15 @@ static ScanKeyword ScanKeywords[] = { ...@@ -53,12 +54,15 @@ static ScanKeyword ScanKeywords[] = {
{"binary", BINARY}, {"binary", BINARY},
{"both", BOTH}, {"both", BOTH},
{"by", BY}, {"by", BY},
{"cascade", CASCADE},
{"cast", CAST}, {"cast", CAST},
{"change", CHANGE}, {"change", CHANGE},
{"char", CHAR},
{"character", CHARACTER}, {"character", CHARACTER},
{"check", CHECK}, {"check", CHECK},
{"close", CLOSE}, {"close", CLOSE},
{"cluster", CLUSTER}, {"cluster", CLUSTER},
{"collate", COLLATE},
{"column", COLUMN}, {"column", COLUMN},
{"commit", COMMIT}, {"commit", COMMIT},
{"constraint", CONSTRAINT}, {"constraint", CONSTRAINT},
...@@ -69,9 +73,10 @@ static ScanKeyword ScanKeywords[] = { ...@@ -69,9 +73,10 @@ static ScanKeyword ScanKeywords[] = {
{"current_date", CURRENT_DATE}, {"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME}, {"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP}, {"current_timestamp", CURRENT_TIMESTAMP},
{"current_user", CURRENT_USER},
{"cursor", CURSOR}, {"cursor", CURSOR},
{"database", DATABASE}, {"database", DATABASE},
{"day", DAYINTERVAL}, {"day", DAY_P},
{"decimal", DECIMAL}, {"decimal", DECIMAL},
{"declare", DECLARE}, {"declare", DECLARE},
{"default", DEFAULT}, {"default", DEFAULT},
...@@ -88,9 +93,11 @@ static ScanKeyword ScanKeywords[] = { ...@@ -88,9 +93,11 @@ static ScanKeyword ScanKeywords[] = {
{"explain", EXPLAIN}, {"explain", EXPLAIN},
{"extend", EXTEND}, {"extend", EXTEND},
{"extract", EXTRACT}, {"extract", EXTRACT},
{"false", FALSE_P},
{"fetch", FETCH}, {"fetch", FETCH},
{"float", FLOAT}, {"float", FLOAT},
{"for", FOR}, {"for", FOR},
{"foreign", FOREIGN},
{"forward", FORWARD}, {"forward", FORWARD},
{"from", FROM}, {"from", FROM},
{"full", FULL}, {"full", FULL},
...@@ -99,11 +106,11 @@ static ScanKeyword ScanKeywords[] = { ...@@ -99,11 +106,11 @@ static ScanKeyword ScanKeywords[] = {
{"group", GROUP}, {"group", GROUP},
{"having", HAVING}, {"having", HAVING},
{"heavy", HEAVY}, {"heavy", HEAVY},
{"hour", HOURINTERVAL}, {"hour", HOUR_P},
{"in", IN}, {"in", IN},
{"index", INDEX}, {"index", INDEX},
{"inherits", INHERITS}, {"inherits", INHERITS},
{"inner", INNERJOIN}, {"inner", INNER_P},
{"insert", INSERT}, {"insert", INSERT},
{"instead", INSTEAD}, {"instead", INSTEAD},
{"interval", INTERVAL}, {"interval", INTERVAL},
...@@ -111,6 +118,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -111,6 +118,7 @@ static ScanKeyword ScanKeywords[] = {
{"is", IS}, {"is", IS},
{"isnull", ISNULL}, {"isnull", ISNULL},
{"join", JOIN}, {"join", JOIN},
{"key", KEY},
{"language", LANGUAGE}, {"language", LANGUAGE},
{"leading", LEADING}, {"leading", LEADING},
{"left", LEFT}, {"left", LEFT},
...@@ -119,18 +127,22 @@ static ScanKeyword ScanKeywords[] = { ...@@ -119,18 +127,22 @@ static ScanKeyword ScanKeywords[] = {
{"listen", LISTEN}, {"listen", LISTEN},
{"load", LOAD}, {"load", LOAD},
{"local", LOCAL}, {"local", LOCAL},
{"match", MATCH},
{"merge", MERGE}, {"merge", MERGE},
{"minute", MINUTEINTERVAL}, {"minute", MINUTE_P},
{"month", MONTHINTERVAL}, {"month", MONTH_P},
{"move", MOVE}, {"move", MOVE},
{"national", NATIONAL},
{"natural", NATURAL}, {"natural", NATURAL},
{"nchar", NCHAR},
{"new", NEW}, {"new", NEW},
{"none", NONE}, {"none", NONE},
{"no", NO},
{"not", NOT}, {"not", NOT},
{"nothing", NOTHING}, {"nothing", NOTHING},
{"notify", NOTIFY}, {"notify", NOTIFY},
{"notnull", NOTNULL}, {"notnull", NOTNULL},
{"null", PNULL}, {"null", NULL_P},
{"numeric", NUMERIC}, {"numeric", NUMERIC},
{"oids", OIDS}, {"oids", OIDS},
{"on", ON}, {"on", ON},
...@@ -138,14 +150,17 @@ static ScanKeyword ScanKeywords[] = { ...@@ -138,14 +150,17 @@ static ScanKeyword ScanKeywords[] = {
{"option", OPTION}, {"option", OPTION},
{"or", OR}, {"or", OR},
{"order", ORDER}, {"order", ORDER},
{"outer", OUTERJOIN}, {"outer", OUTER_P},
{"partial", PARTIAL},
{"position", POSITION}, {"position", POSITION},
{"precision", PRECISION}, {"precision", PRECISION},
{"primary", PRIMARY},
{"privileges", PRIVILEGES}, {"privileges", PRIVILEGES},
{"procedure", PROCEDURE}, {"procedure", PROCEDURE},
{"public", PUBLIC}, {"public", PUBLIC},
{"purge", PURGE}, {"purge", PURGE},
{"recipe", RECIPE}, {"recipe", RECIPE},
{"references", REFERENCES},
{"rename", RENAME}, {"rename", RENAME},
{"replace", REPLACE}, {"replace", REPLACE},
{"reset", RESET}, {"reset", RESET},
...@@ -155,7 +170,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -155,7 +170,7 @@ static ScanKeyword ScanKeywords[] = {
{"right", RIGHT}, {"right", RIGHT},
{"rollback", ROLLBACK}, {"rollback", ROLLBACK},
{"rule", RULE}, {"rule", RULE},
{"second", SECONDINTERVAL}, {"second", SECOND_P},
{"select", SELECT}, {"select", SELECT},
{"sequence", SEQUENCE}, {"sequence", SEQUENCE},
{"set", SET}, {"set", SET},
...@@ -172,13 +187,15 @@ static ScanKeyword ScanKeywords[] = { ...@@ -172,13 +187,15 @@ static ScanKeyword ScanKeywords[] = {
{"transaction", TRANSACTION}, {"transaction", TRANSACTION},
{"trigger", TRIGGER}, {"trigger", TRIGGER},
{"trim", TRIM}, {"trim", TRIM},
{"type", P_TYPE}, {"true", TRUE_P},
{"type", TYPE_P},
{"union", UNION}, {"union", UNION},
{"unique", UNIQUE}, {"unique", UNIQUE},
{"update", UPDATE}, {"update", UPDATE},
{"using", USING}, {"using", USING},
{"vacuum", VACUUM}, {"vacuum", VACUUM},
{"values", VALUES}, {"values", VALUES},
{"varchar", VARCHAR},
{"varying", VARYING}, {"varying", VARYING},
{"verbose", VERBOSE}, {"verbose", VERBOSE},
{"version", VERSION}, {"version", VERSION},
...@@ -186,7 +203,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -186,7 +203,7 @@ static ScanKeyword ScanKeywords[] = {
{"where", WHERE}, {"where", WHERE},
{"with", WITH}, {"with", WITH},
{"work", WORK}, {"work", WORK},
{"year", YEARINTERVAL}, {"year", YEAR_P},
{"zone", ZONE}, {"zone", ZONE},
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment