Add SQL92 reserved words for primary and foreign keys.
authorThomas G. Lockhart
Sat, 25 Oct 1997 05:44:11 +0000 (05:44 +0000)
committerThomas G. Lockhart
Sat, 25 Oct 1997 05:44:11 +0000 (05:44 +0000)
Add keywords for national character types.
Shorted date/time keyword token names for convenience.
Add SQL3 reserved words TRUE and FALSE.

src/backend/parser/keywords.c

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