aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>1997-09-01 05:53:31 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>1997-09-01 05:53:31 +0000
commit05eb63286483bab94cc44f77124b98a25e8fdac7 (patch)
treefe74dd94c49a6b466292f5b730597e9c58f800d7 /src
parent559a28747a2db62aa0e209d96cfecd3be8d77807 (diff)
downloadpostgresql-05eb63286483bab94cc44f77124b98a25e8fdac7.tar.gz
postgresql-05eb63286483bab94cc44f77124b98a25e8fdac7.zip
Add more reserved words, mostly for SQL92 compliance.
Include reserved words for string handling, outer joins, and unions.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/keywords.c63
1 files changed, 45 insertions, 18 deletions
diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c
index d2275f3789e..1d663b9c8a2 100644
--- a/src/backend/parser/keywords.c
+++ b/src/backend/parser/keywords.c
@@ -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 *