Add more reserved words, mostly for SQL92 compliance.
authorThomas G. Lockhart
Mon, 1 Sep 1997 05:53:31 +0000 (05:53 +0000)
committerThomas G. Lockhart
Mon, 1 Sep 1997 05:53:31 +0000 (05:53 +0000)
Include reserved words for string handling, outer joins, and unions.

src/backend/parser/keywords.c

index d2275f3789e10060711837a954f133fc79c52147..1d663b9c8a294b041c958ec887e637be2567eaed 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.12 1997/08/22 14:33:21 vadim Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.13 1997/09/01 05:53:31 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,7 +35,7 @@ static ScanKeyword ScanKeywords[] = {
    { "acl",        ACL     },
    { "add",        ADD     },
    { "after",      AFTER       },
-   { "aggregate",          AGGREGATE       },
+   { "aggregate",      AGGREGATE   },
    { "all",        ALL     },
    { "alter",      ALTER       },
    { "analyze",        ANALYZE     },
@@ -44,13 +44,14 @@ static ScanKeyword ScanKeywords[] = {
    { "archIve",        ARCHIVE     },   /* XXX crooked: I < _ */
    { "arch_store",     ARCH_STORE  },
    { "archive",        ARCHIVE     },   /* XXX crooked: i > _ */
-        { "as",                 AS              },
-        { "asc",       ASC             },
+        { "as",                 AS     },
+        { "asc",       ASC     },
    { "backward",       BACKWARD    },
    { "before",     BEFORE      },
    { "begin",      BEGIN_TRANS },
    { "between",        BETWEEN     },
    { "binary",     BINARY      },
+   { "both",       BOTH        },
    { "by",         BY      },
    { "cast",       CAST        },
    { "change",     CHANGE      },
@@ -62,70 +63,89 @@ static ScanKeyword ScanKeywords[] = {
    { "constraint",     CONSTRAINT  },
    { "copy",       COPY        },
    { "create",     CREATE      },
+   { "cross",      CROSS       },
    { "current",        CURRENT     },
    { "cursor",     CURSOR      },
    { "database",       DATABASE    },
+   { "day",        DAYINTERVAL },
    { "declare",        DECLARE     },
    { "default",        DEFAULT     },
    { "delete",     DELETE      },
-   { "delimiters",         DELIMITERS      },
+   { "delimiters",     DELIMITERS  },
    { "desc",       DESC        },
    { "distinct",       DISTINCT    },
    { "do",         DO      },
    { "drop",       DROP        },
    { "end",        END_TRANS   },
    { "execute",        EXECUTE     },
+   { "exists",     EXISTS      },
    { "explain",        EXPLAIN     },
    { "extend",     EXTEND      },
+   { "extract",        EXTRACT     },
    { "fetch",      FETCH       },
    { "for",        FOR     },
    { "forward",        FORWARD     },
    { "from",       FROM        },
+   { "full",       FULL        },
    { "function",       FUNCTION    },
-   { "grant",              GRANT           },
+   { "grant",      GRANT       },
    { "group",      GROUP       },
    { "having",     HAVING      },
    { "heavy",      HEAVY       },
+   { "hour",       HOURINTERVAL    },
    { "in",         IN      },
    { "index",      INDEX       },
    { "inherits",       INHERITS    },
+   { "inner",      INNERJOIN   },
    { "insert",     INSERT      },
    { "instead",        INSTEAD     },
+   { "interval",       INTERVAL    },
    { "into",       INTO        },
    { "is",         IS      },
-   { "isnull",             ISNULL          },
+   { "isnull",     ISNULL      },
+   { "join",       JOIN        },
    { "language",       LANGUAGE    },
+   { "leading",        LEADING     },
+   { "left",       LEFT        },
    { "light",      LIGHT       },
    { "like",       LIKE        },
-   { "listen",             LISTEN          },
-   { "load",               LOAD            },
+   { "listen",     LISTEN      },
+   { "load",       LOAD        },
+   { "local",      LOCAL       },
    { "merge",      MERGE       },
+   { "minute",     MINUTEINTERVAL  },
+   { "month",      MONTHINTERVAL   },
    { "move",       MOVE        },
+   { "natural",        NATURAL     },
    { "new",        NEW     },
    { "none",       NONE        },
    { "not",        NOT     },
-   { "nothing",            NOTHING         },
-   { "notify",             NOTIFY          },
-   { "notnull",            NOTNULL         },
+   { "nothing",        NOTHING     },
+   { "notify",     NOTIFY      },
+   { "notnull",        NOTNULL     },
    { "null",       PNULL       },
    { "oids",       OIDS        },
    { "on",         ON      },
    { "operator",       OPERATOR    },
-        { "option",             OPTION          },
+        { "option",        OPTION      },
    { "or",         OR      },
    { "order",      ORDER       },
-        { "privileges",         PRIVILEGES      },
-   { "public",             PUBLIC          },
+   { "outer",      OUTERJOIN   },
+        { "position",      POSITION    },
+        { "privileges",        PRIVILEGES  },
+   { "public",     PUBLIC      },
    { "purge",      PURGE       },
-   { "recipe",             RECIPE          },
+   { "recipe",     RECIPE      },
    { "rename",     RENAME      },
    { "replace",        REPLACE     },
    { "reset",      RESET       },
    { "retrieve",       RETRIEVE    },
    { "returns",        RETURNS     },
-        { "revoke",             REVOKE          },
+        { "revoke",        REVOKE      },
+        { "right",     RIGHT       },
    { "rollback",       ROLLBACK    },
    { "rule",       RULE        },
+   { "second",     SECONDINTERVAL  },
    { "select",     SELECT      },
    { "sequence",       SEQUENCE    },
    { "set",        SET     },
@@ -134,11 +154,16 @@ static ScanKeyword ScanKeywords[] = {
    { "stdin",      STDIN       },
    { "stdout",     STDOUT      },
    { "store",      STORE       },
+   { "substring",      SUBSTRING   },
    { "table",      TABLE       },
+   { "time",       TIME        },
    { "to",         TO      },
    { "transaction",    TRANSACTION },
+   { "trailing",       TRAILING    },
+   { "trim",       TRIM        },
    { "type",       P_TYPE      },
-   { "unique",             UNIQUE          },
+   { "union",      UNION       },
+   { "unique",     UNIQUE      },
    { "update",     UPDATE      },
    { "using",      USING       },
    { "vacuum",     VACUUM      },
@@ -149,6 +174,8 @@ static ScanKeyword ScanKeywords[] = {
    { "where",      WHERE       },
    { "with",       WITH        },
    { "work",       WORK        },
+   { "year",       YEARINTERVAL    },
+   { "zone",       ZONE        },
 };
 
 ScanKeyword *