From 5e40a17d184a999b929945505ed6969baafc950c Mon Sep 17 00:00:00 2001
From: Mark Dilger <mark.dilger@enterprisedb.com>
Date: Tue, 21 Jul 2020 15:47:22 -0700
Subject: [PATCH v3 3/3] Extending function pg_get_keywords

Adding to the return value of pg_get_keywords a fourth column
showing whether the keyword can be used as a bare column label.
---
 doc/src/sgml/func.sgml               |   5 +-
 src/backend/parser/check_keywords.pl |  10 +-
 src/backend/utils/adt/misc.c         |   9 +-
 src/include/catalog/pg_proc.dat      |   6 +-
 src/include/common/kwlookup.h        |   8 +
 src/include/parser/kwlist.h          | 900 +++++++++++++--------------
 src/tools/gen_keywordlist.pl         |  30 +-
 7 files changed, 507 insertions(+), 461 deletions(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 959f6a1c2f..34b25ce21a 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -22158,7 +22158,8 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
         <returnvalue>setof record</returnvalue>
         ( <parameter>word</parameter> <type>text</type>,
         <parameter>catcode</parameter> <type>"char"</type>,
-        <parameter>catdesc</parameter> <type>text</type> )
+        <parameter>catdesc</parameter> <type>text</type>,
+        <parameter>bare</parameter> <type>boolean</type> )
        </para>
        <para>
         Returns a set of records describing the SQL keywords recognized by the
@@ -22170,6 +22171,8 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
         function name, or <literal>R</literal> for a fully reserved keyword.
         The <parameter>catdesc</parameter> column contains a
         possibly-localized string describing the category.
+        The <parameter>bare</parameter> column is true if the keyword can be used
+        as a bare column label, false otherwise.
        </para></entry>
       </row>
 
diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl
index 98f50c4129..eea449259f 100644
--- a/src/backend/parser/check_keywords.pl
+++ b/src/backend/parser/check_keywords.pl
@@ -184,10 +184,10 @@ kwlist_line: while (<$kwlist>)
 		my ($kwstring) = $1;
 		my ($kwname)   = $2;
 		my ($kwcat_id) = $3;
-		my ($isbare)   = $4;
+		my ($status)   = $4;
 
-		# Check that the isbare value matches gram.y
-		if ($isbare eq 'BARE')
+		# Check that the keyword label status value matches treatment in gram.y
+		if ($status eq 'BARE_LABEL')
 		{
 			unless ($bare{$kwname})
 			{
@@ -195,7 +195,7 @@ kwlist_line: while (<$kwlist>)
 				  "'$kwstring' in kwlist.h is marked as bare, but is missing from gram.y's bare_label_keyword rule";
 			}
 		}
-		elsif ($isbare eq 'EXPLICIT')
+		elsif ($status eq 'EXPLICIT_LABEL')
 		{
 			if ($bare{$kwname})
 			{
@@ -206,7 +206,7 @@ kwlist_line: while (<$kwlist>)
 		else
 		{
 			error
-			  "'$isbare' not recognized in kwlist.h.  Expected either 'BARE' or 'EXPLICIT'";
+			  "'$status' not recognized in kwlist.h.  Expected either 'BARE_LABEL' or 'EXPLICIT_LABEL'";
 		}
 
 		# Check that the list is in alphabetical order (critical!)
diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index 37c23c9155..04d0b0decb 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -423,6 +423,8 @@ pg_get_keywords(PG_FUNCTION_ARGS)
 						   CHAROID, -1, 0);
 		TupleDescInitEntry(tupdesc, (AttrNumber) 3, "catdesc",
 						   TEXTOID, -1, 0);
+		TupleDescInitEntry(tupdesc, (AttrNumber) 4, "bare",
+						   BOOLOID, -1, 0);
 
 		funcctx->attinmeta = TupleDescGetAttInMetadata(tupdesc);
 
@@ -433,7 +435,7 @@ pg_get_keywords(PG_FUNCTION_ARGS)
 
 	if (funcctx->call_cntr < ScanKeywords.num_keywords)
 	{
-		char	   *values[3];
+		char	   *values[4];
 		HeapTuple	tuple;
 
 		/* cast-away-const is ugly but alternatives aren't much better */
@@ -465,6 +467,11 @@ pg_get_keywords(PG_FUNCTION_ARGS)
 				break;
 		}
 
+		if (GetScanKeywordIsBare(funcctx->call_cntr, &ScanKeywords))
+			values[3] = unconstify(char *, (const char *)"true");
+		else
+			values[3] = unconstify(char *, (const char *)"false");
+
 		tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
 
 		SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 88d59fb96d..3076ce3b15 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -3678,10 +3678,10 @@
   prosrc => 'pg_get_function_arg_default' },
 
 { oid => '1686', descr => 'list of SQL keywords',
-  proname => 'pg_get_keywords', procost => '10', prorows => '400',
+  proname => 'pg_get_keywords', procost => '10', prorows => '450',
   proretset => 't', provolatile => 's', prorettype => 'record',
-  proargtypes => '', proallargtypes => '{text,char,text}',
-  proargmodes => '{o,o,o}', proargnames => '{word,catcode,catdesc}',
+  proargtypes => '', proallargtypes => '{text,char,text,bool}',
+  proargmodes => '{o,o,o,o}', proargnames => '{word,catcode,catdesc,bare}',
   prosrc => 'pg_get_keywords' },
 
 { oid => '2289', descr => 'convert generic options array to name/value table',
diff --git a/src/include/common/kwlookup.h b/src/include/common/kwlookup.h
index 9c0c7f88d8..3283695dec 100644
--- a/src/include/common/kwlookup.h
+++ b/src/include/common/kwlookup.h
@@ -26,6 +26,7 @@ typedef struct ScanKeywordList
 {
 	const char *kw_string;		/* all keywords in order, separated by \0 */
 	const uint16 *kw_offsets;	/* offsets to the start of each keyword */
+	const bool *kw_is_bare;		/* whether each keyword can be used as a bare label */
 	ScanKeywordHashFunc hash;	/* perfect hash function for keywords */
 	int			num_keywords;	/* number of keywords */
 	int			max_kw_len;		/* length of longest keyword */
@@ -41,4 +42,11 @@ GetScanKeyword(int n, const ScanKeywordList *keywords)
 	return keywords->kw_string + keywords->kw_offsets[n];
 }
 
+/* Code that wants to retrieve the bareness of the N'th keyword should use this. */
+static inline bool
+GetScanKeywordIsBare(int n, const ScanKeywordList *keywords)
+{
+	return keywords->kw_is_bare[n];
+}
+
 #endif							/* KWLOOKUP_H */
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 917e2cffa9..cdfdb65e69 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -25,453 +25,453 @@
  */
 
 /* name, value, category, is bare */
-PG_KEYWORD("abort", ABORT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("absolute", ABSOLUTE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("access", ACCESS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("action", ACTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("add", ADD_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("admin", ADMIN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("after", AFTER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("aggregate", AGGREGATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("all", ALL, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("also", ALSO, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("alter", ALTER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("always", ALWAYS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("analyse", ANALYSE, RESERVED_KEYWORD, BARE)		/* British spelling */
-PG_KEYWORD("analyze", ANALYZE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("and", AND, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("any", ANY, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("array", ARRAY, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("as", AS, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("asc", ASC, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("assertion", ASSERTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("assignment", ASSIGNMENT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("asymmetric", ASYMMETRIC, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("at", AT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("attach", ATTACH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("attribute", ATTRIBUTE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("before", BEFORE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("begin", BEGIN_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("both", BOTH, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("by", BY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cache", CACHE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("call", CALL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("called", CALLED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cascade", CASCADE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cascaded", CASCADED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("case", CASE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("cast", CAST, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("catalog", CATALOG_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("chain", CHAIN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("char", CHAR_P, COL_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("character", CHARACTER, COL_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("characteristics", CHARACTERISTICS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("check", CHECK, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("checkpoint", CHECKPOINT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("class", CLASS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("close", CLOSE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cluster", CLUSTER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("coalesce", COALESCE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("collate", COLLATE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("collation", COLLATION, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("column", COLUMN, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("columns", COLUMNS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("comment", COMMENT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("comments", COMMENTS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("commit", COMMIT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("committed", COMMITTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("concurrently", CONCURRENTLY, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("configuration", CONFIGURATION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("conflict", CONFLICT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("connection", CONNECTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("constraint", CONSTRAINT, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("constraints", CONSTRAINTS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("content", CONTENT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("continue", CONTINUE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("copy", COPY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cost", COST, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("create", CREATE, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("cross", CROSS, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("csv", CSV, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cube", CUBE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("current", CURRENT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_catalog", CURRENT_CATALOG, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_date", CURRENT_DATE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_role", CURRENT_ROLE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_schema", CURRENT_SCHEMA, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("current_time", CURRENT_TIME, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_timestamp", CURRENT_TIMESTAMP, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("current_user", CURRENT_USER, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("cursor", CURSOR, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("cycle", CYCLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("data", DATA_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("database", DATABASE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("day", DAY_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("deallocate", DEALLOCATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("dec", DEC, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("decimal", DECIMAL_P, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("declare", DECLARE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("default", DEFAULT, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("defaults", DEFAULTS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("deferrable", DEFERRABLE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("deferred", DEFERRED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("definer", DEFINER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("delete", DELETE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("delimiter", DELIMITER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("delimiters", DELIMITERS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("depends", DEPENDS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("desc", DESC, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("detach", DETACH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("dictionary", DICTIONARY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("disable", DISABLE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("discard", DISCARD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("distinct", DISTINCT, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("do", DO, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("document", DOCUMENT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("domain", DOMAIN_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("double", DOUBLE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("drop", DROP, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("each", EACH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("else", ELSE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("enable", ENABLE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("encoding", ENCODING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("encrypted", ENCRYPTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("end", END_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("enum", ENUM_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("escape", ESCAPE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("event", EVENT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("except", EXCEPT, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("exclude", EXCLUDE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("excluding", EXCLUDING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("exclusive", EXCLUSIVE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("execute", EXECUTE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("exists", EXISTS, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("explain", EXPLAIN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("expression", EXPRESSION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("extension", EXTENSION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("external", EXTERNAL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("extract", EXTRACT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("false", FALSE_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("family", FAMILY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("fetch", FETCH, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("filter", FILTER, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("first", FIRST_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("float", FLOAT_P, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("following", FOLLOWING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("for", FOR, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("force", FORCE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("foreign", FOREIGN, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("forward", FORWARD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("freeze", FREEZE, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("from", FROM, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("full", FULL, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("function", FUNCTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("functions", FUNCTIONS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("generated", GENERATED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("global", GLOBAL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("grant", GRANT, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("groups", GROUPS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("having", HAVING, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("hour", HOUR_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("identity", IDENTITY_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("if", IF_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("ilike", ILIKE, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("immediate", IMMEDIATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("immutable", IMMUTABLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("implicit", IMPLICIT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("import", IMPORT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("insensitive", INSENSITIVE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("insert", INSERT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("instead", INSTEAD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("int", INT_P, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("into", INTO, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("invoker", INVOKER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("is", IS, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("label", LABEL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("lateral", LATERAL_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("leading", LEADING, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("leakproof", LEAKPROOF, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("least", LEAST, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("left", LEFT, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("level", LEVEL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("like", LIKE, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("limit", LIMIT, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("listen", LISTEN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("load", LOAD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("local", LOCAL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("localtimestamp", LOCALTIMESTAMP, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("location", LOCATION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("lock", LOCK_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("locked", LOCKED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("logged", LOGGED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("mapping", MAPPING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("match", MATCH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("materialized", MATERIALIZED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("method", METHOD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("minute", MINUTE_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("month", MONTH_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("names", NAMES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("national", NATIONAL, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("nchar", NCHAR, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("new", NEW, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("next", NEXT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("nfc", NFC, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("nfd", NFD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("nfkc", NFKC, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("nfkd", NFKD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("no", NO, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("none", NONE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("normalize", NORMALIZE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("normalized", NORMALIZED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("not", NOT, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("nothing", NOTHING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("notify", NOTIFY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("notnull", NOTNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("nowait", NOWAIT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("null", NULL_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("nullif", NULLIF, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("nulls", NULLS_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("numeric", NUMERIC, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("object", OBJECT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("of", OF, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("off", OFF, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("offset", OFFSET, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("oids", OIDS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("old", OLD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("on", ON, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("only", ONLY, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("operator", OPERATOR, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("option", OPTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("options", OPTIONS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("or", OR, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("order", ORDER, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("ordinality", ORDINALITY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("others", OTHERS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("out", OUT_P, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("outer", OUTER_P, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("over", OVER, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("overlaps", OVERLAPS, TYPE_FUNC_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("overlay", OVERLAY, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("overriding", OVERRIDING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("owned", OWNED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("owner", OWNER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("plans", PLANS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("policy", POLICY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("position", POSITION, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("preceding", PRECEDING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("precision", PRECISION, COL_NAME_KEYWORD, EXPLICIT)
-PG_KEYWORD("prepare", PREPARE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("prepared", PREPARED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("preserve", PRESERVE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("primary", PRIMARY, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("prior", PRIOR, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("privileges", PRIVILEGES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("procedural", PROCEDURAL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("procedure", PROCEDURE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("procedures", PROCEDURES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("program", PROGRAM, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("publication", PUBLICATION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("quote", QUOTE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("read", READ, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("real", REAL, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("ref", REF, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("referencing", REFERENCING, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("refresh", REFRESH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("reindex", REINDEX, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("relative", RELATIVE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("release", RELEASE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("rollup", ROLLUP, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("routine", ROUTINE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("routines", ROUTINES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("row", ROW, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("savepoint", SAVEPOINT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("schema", SCHEMA, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("schemas", SCHEMAS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("scroll", SCROLL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("search", SEARCH, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("second", SECOND_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("security", SECURITY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("select", SELECT, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("sequence", SEQUENCE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("sequences", SEQUENCES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("serializable", SERIALIZABLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("server", SERVER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("session", SESSION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("session_user", SESSION_USER, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("set", SET, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("setof", SETOF, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("sets", SETS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("share", SHARE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("show", SHOW, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("similar", SIMILAR, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("simple", SIMPLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("skip", SKIP, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("smallint", SMALLINT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("snapshot", SNAPSHOT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("some", SOME, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("sql", SQL_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("stable", STABLE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("standalone", STANDALONE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("start", START, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("statement", STATEMENT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("statistics", STATISTICS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("stdin", STDIN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("stdout", STDOUT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("stored", STORED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("strict", STRICT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("strip", STRIP_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("subscription", SUBSCRIPTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("substring", SUBSTRING, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("support", SUPPORT, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("symmetric", SYMMETRIC, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("sysid", SYSID, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("system", SYSTEM_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("table", TABLE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("tables", TABLES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("tablesample", TABLESAMPLE, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("tablespace", TABLESPACE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("temp", TEMP, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("template", TEMPLATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("temporary", TEMPORARY, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("text", TEXT_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("then", THEN, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("ties", TIES, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("time", TIME, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("timestamp", TIMESTAMP, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("to", TO, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("trailing", TRAILING, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("transaction", TRANSACTION, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("transform", TRANSFORM, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("treat", TREAT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("trigger", TRIGGER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("trim", TRIM, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("true", TRUE_P, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("truncate", TRUNCATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("trusted", TRUSTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("type", TYPE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("types", TYPES_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("uescape", UESCAPE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("unbounded", UNBOUNDED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("uncommitted", UNCOMMITTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("unencrypted", UNENCRYPTED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("union", UNION, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("unique", UNIQUE, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("unknown", UNKNOWN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("unlisten", UNLISTEN, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("unlogged", UNLOGGED, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("until", UNTIL, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("update", UPDATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("user", USER, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("using", USING, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("vacuum", VACUUM, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("valid", VALID, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("validate", VALIDATE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("validator", VALIDATOR, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("value", VALUE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("values", VALUES, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("varchar", VARCHAR, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("variadic", VARIADIC, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("varying", VARYING, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("verbose", VERBOSE, TYPE_FUNC_NAME_KEYWORD, BARE)
-PG_KEYWORD("version", VERSION_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("view", VIEW, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("views", VIEWS, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("volatile", VOLATILE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("when", WHEN, RESERVED_KEYWORD, BARE)
-PG_KEYWORD("where", WHERE, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("whitespace", WHITESPACE_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("window", WINDOW, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("with", WITH, RESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("within", WITHIN, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("without", WITHOUT, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("work", WORK, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("wrapper", WRAPPER, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("write", WRITE, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("xml", XML_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("xmlattributes", XMLATTRIBUTES, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlconcat", XMLCONCAT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlelement", XMLELEMENT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlexists", XMLEXISTS, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlforest", XMLFOREST, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlnamespaces", XMLNAMESPACES, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlparse", XMLPARSE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlpi", XMLPI, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlroot", XMLROOT, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmlserialize", XMLSERIALIZE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("xmltable", XMLTABLE, COL_NAME_KEYWORD, BARE)
-PG_KEYWORD("year", YEAR_P, UNRESERVED_KEYWORD, EXPLICIT)
-PG_KEYWORD("yes", YES_P, UNRESERVED_KEYWORD, BARE)
-PG_KEYWORD("zone", ZONE, UNRESERVED_KEYWORD, BARE)
+PG_KEYWORD("abort", ABORT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("absolute", ABSOLUTE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("access", ACCESS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("action", ACTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("add", ADD_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("admin", ADMIN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("after", AFTER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("aggregate", AGGREGATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("all", ALL, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("also", ALSO, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("alter", ALTER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("always", ALWAYS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("analyse", ANALYSE, RESERVED_KEYWORD, BARE_LABEL)		/* British spelling */
+PG_KEYWORD("analyze", ANALYZE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("and", AND, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("any", ANY, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("array", ARRAY, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("as", AS, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("asc", ASC, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("assertion", ASSERTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("assignment", ASSIGNMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("asymmetric", ASYMMETRIC, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("at", AT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("attach", ATTACH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("attribute", ATTRIBUTE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("before", BEFORE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("begin", BEGIN_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("both", BOTH, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("by", BY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cache", CACHE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("call", CALL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("called", CALLED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cascade", CASCADE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cascaded", CASCADED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("case", CASE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cast", CAST, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("catalog", CATALOG_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("chain", CHAIN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("char", CHAR_P, COL_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("character", CHARACTER, COL_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("characteristics", CHARACTERISTICS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("check", CHECK, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("checkpoint", CHECKPOINT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("class", CLASS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("close", CLOSE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cluster", CLUSTER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("coalesce", COALESCE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("collate", COLLATE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("collation", COLLATION, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("column", COLUMN, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("columns", COLUMNS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("comment", COMMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("comments", COMMENTS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("commit", COMMIT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("committed", COMMITTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("concurrently", CONCURRENTLY, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("configuration", CONFIGURATION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("conflict", CONFLICT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("connection", CONNECTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("constraint", CONSTRAINT, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("constraints", CONSTRAINTS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("content", CONTENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("continue", CONTINUE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("copy", COPY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cost", COST, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("create", CREATE, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("cross", CROSS, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("csv", CSV, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cube", CUBE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current", CURRENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_catalog", CURRENT_CATALOG, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_date", CURRENT_DATE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_role", CURRENT_ROLE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_schema", CURRENT_SCHEMA, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_time", CURRENT_TIME, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_timestamp", CURRENT_TIMESTAMP, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("current_user", CURRENT_USER, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cursor", CURSOR, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("cycle", CYCLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("data", DATA_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("database", DATABASE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("day", DAY_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("deallocate", DEALLOCATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("dec", DEC, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("decimal", DECIMAL_P, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("declare", DECLARE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("default", DEFAULT, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("defaults", DEFAULTS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("deferrable", DEFERRABLE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("deferred", DEFERRED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("definer", DEFINER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("delete", DELETE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("delimiter", DELIMITER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("delimiters", DELIMITERS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("depends", DEPENDS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("desc", DESC, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("detach", DETACH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("dictionary", DICTIONARY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("disable", DISABLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("discard", DISCARD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("distinct", DISTINCT, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("do", DO, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("document", DOCUMENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("domain", DOMAIN_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("double", DOUBLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("drop", DROP, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("each", EACH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("else", ELSE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("enable", ENABLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("encoding", ENCODING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("encrypted", ENCRYPTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("end", END_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("enum", ENUM_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("escape", ESCAPE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("event", EVENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("except", EXCEPT, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("exclude", EXCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("excluding", EXCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("exclusive", EXCLUSIVE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("execute", EXECUTE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("exists", EXISTS, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("explain", EXPLAIN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("expression", EXPRESSION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("extension", EXTENSION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("external", EXTERNAL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("extract", EXTRACT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("false", FALSE_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("family", FAMILY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("fetch", FETCH, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("filter", FILTER, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("first", FIRST_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("float", FLOAT_P, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("following", FOLLOWING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("for", FOR, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("force", FORCE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("foreign", FOREIGN, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("forward", FORWARD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("freeze", FREEZE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("from", FROM, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("full", FULL, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("function", FUNCTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("functions", FUNCTIONS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("generated", GENERATED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("global", GLOBAL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("grant", GRANT, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("groups", GROUPS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("having", HAVING, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("hour", HOUR_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("identity", IDENTITY_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("if", IF_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("ilike", ILIKE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("immediate", IMMEDIATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("immutable", IMMUTABLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("implicit", IMPLICIT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("import", IMPORT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("insensitive", INSENSITIVE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("insert", INSERT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("instead", INSTEAD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("int", INT_P, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("into", INTO, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("invoker", INVOKER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("is", IS, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("label", LABEL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("lateral", LATERAL_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("leading", LEADING, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("leakproof", LEAKPROOF, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("least", LEAST, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("left", LEFT, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("level", LEVEL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("like", LIKE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("limit", LIMIT, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("listen", LISTEN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("load", LOAD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("local", LOCAL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("localtimestamp", LOCALTIMESTAMP, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("location", LOCATION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("lock", LOCK_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("locked", LOCKED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("logged", LOGGED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("mapping", MAPPING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("match", MATCH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("materialized", MATERIALIZED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("method", METHOD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("minute", MINUTE_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("month", MONTH_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("names", NAMES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("national", NATIONAL, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nchar", NCHAR, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("new", NEW, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("next", NEXT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nfc", NFC, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nfd", NFD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nfkc", NFKC, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nfkd", NFKD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("no", NO, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("none", NONE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("normalize", NORMALIZE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("normalized", NORMALIZED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("not", NOT, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nothing", NOTHING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("notify", NOTIFY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("notnull", NOTNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("nowait", NOWAIT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("null", NULL_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nullif", NULLIF, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("nulls", NULLS_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("numeric", NUMERIC, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("object", OBJECT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("of", OF, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("off", OFF, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("offset", OFFSET, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("oids", OIDS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("old", OLD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("on", ON, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("only", ONLY, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("operator", OPERATOR, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("option", OPTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("options", OPTIONS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("or", OR, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("order", ORDER, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("ordinality", ORDINALITY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("others", OTHERS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("out", OUT_P, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("outer", OUTER_P, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("over", OVER, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("overlaps", OVERLAPS, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("overlay", OVERLAY, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("overriding", OVERRIDING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("owned", OWNED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("owner", OWNER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("plans", PLANS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("policy", POLICY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("position", POSITION, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("preceding", PRECEDING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("precision", PRECISION, COL_NAME_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("prepare", PREPARE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("prepared", PREPARED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("preserve", PRESERVE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("primary", PRIMARY, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("prior", PRIOR, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("privileges", PRIVILEGES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("procedural", PROCEDURAL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("procedure", PROCEDURE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("procedures", PROCEDURES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("program", PROGRAM, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("publication", PUBLICATION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("quote", QUOTE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("read", READ, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("real", REAL, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("ref", REF, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("referencing", REFERENCING, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("refresh", REFRESH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("reindex", REINDEX, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("relative", RELATIVE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("release", RELEASE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("rollup", ROLLUP, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("routine", ROUTINE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("routines", ROUTINES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("row", ROW, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("savepoint", SAVEPOINT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("schema", SCHEMA, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("schemas", SCHEMAS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("scroll", SCROLL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("search", SEARCH, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("second", SECOND_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("security", SECURITY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("select", SELECT, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("sequence", SEQUENCE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("sequences", SEQUENCES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("serializable", SERIALIZABLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("server", SERVER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("session", SESSION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("session_user", SESSION_USER, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("set", SET, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("setof", SETOF, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("sets", SETS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("share", SHARE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("show", SHOW, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("similar", SIMILAR, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("simple", SIMPLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("skip", SKIP, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("smallint", SMALLINT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("snapshot", SNAPSHOT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("some", SOME, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("sql", SQL_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("stable", STABLE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("standalone", STANDALONE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("start", START, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("statement", STATEMENT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("statistics", STATISTICS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("stdin", STDIN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("stdout", STDOUT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("stored", STORED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("strict", STRICT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("strip", STRIP_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("subscription", SUBSCRIPTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("substring", SUBSTRING, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("support", SUPPORT, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("symmetric", SYMMETRIC, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("sysid", SYSID, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("system", SYSTEM_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("table", TABLE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("tables", TABLES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("tablesample", TABLESAMPLE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("tablespace", TABLESPACE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("temp", TEMP, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("template", TEMPLATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("temporary", TEMPORARY, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("text", TEXT_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("then", THEN, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("ties", TIES, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("time", TIME, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("timestamp", TIMESTAMP, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("to", TO, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("trailing", TRAILING, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("transaction", TRANSACTION, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("transform", TRANSFORM, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("treat", TREAT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("trigger", TRIGGER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("trim", TRIM, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("true", TRUE_P, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("truncate", TRUNCATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("trusted", TRUSTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("type", TYPE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("types", TYPES_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("uescape", UESCAPE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("unbounded", UNBOUNDED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("uncommitted", UNCOMMITTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("unencrypted", UNENCRYPTED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("union", UNION, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("unique", UNIQUE, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("unknown", UNKNOWN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("unlisten", UNLISTEN, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("unlogged", UNLOGGED, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("until", UNTIL, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("update", UPDATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("user", USER, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("using", USING, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("vacuum", VACUUM, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("valid", VALID, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("validate", VALIDATE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("validator", VALIDATOR, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("value", VALUE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("values", VALUES, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("varchar", VARCHAR, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("variadic", VARIADIC, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("varying", VARYING, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("verbose", VERBOSE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("version", VERSION_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("view", VIEW, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("views", VIEWS, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("volatile", VOLATILE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("when", WHEN, RESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("where", WHERE, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("whitespace", WHITESPACE_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("window", WINDOW, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("with", WITH, RESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("within", WITHIN, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("without", WITHOUT, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("work", WORK, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("wrapper", WRAPPER, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("write", WRITE, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xml", XML_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlattributes", XMLATTRIBUTES, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlconcat", XMLCONCAT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlelement", XMLELEMENT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlexists", XMLEXISTS, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlforest", XMLFOREST, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlnamespaces", XMLNAMESPACES, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlparse", XMLPARSE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlpi", XMLPI, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlroot", XMLROOT, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmlserialize", XMLSERIALIZE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("xmltable", XMLTABLE, COL_NAME_KEYWORD, BARE_LABEL)
+PG_KEYWORD("year", YEAR_P, UNRESERVED_KEYWORD, EXPLICIT_LABEL)
+PG_KEYWORD("yes", YES_P, UNRESERVED_KEYWORD, BARE_LABEL)
+PG_KEYWORD("zone", ZONE, UNRESERVED_KEYWORD, BARE_LABEL)
diff --git a/src/tools/gen_keywordlist.pl b/src/tools/gen_keywordlist.pl
index e9250b8fb2..c321af8fd1 100644
--- a/src/tools/gen_keywordlist.pl
+++ b/src/tools/gen_keywordlist.pl
@@ -93,11 +93,27 @@ EOM
 
 # Parse input file for keyword names.
 my @keywords;
+my @bare;
+my %transform = ( BARE_LABEL => 'true', EXPLICIT_LABEL => 'false');
 while (<$kif>)
 {
 	if (/^PG_KEYWORD\("(\w+)"/)
 	{
-		push @keywords, $1;
+		my $kword = $1;
+		push @keywords, $kword;
+
+		if (/^PG_KEYWORD\("\w+", .*, (BARE_LABEL|EXPLICIT_LABEL)\)/)
+		{
+			push @bare, $transform{$1};
+		}
+		else
+		{
+			# parser/kwlist.h lists each keyword as either bare or
+			# explicit, but ecpg neither needs nor has any such
+			# distintion.  It really doesn't matter what we use here
+			# as long as it is a valid boolean, so we use 'true'.
+			push @bare, 'true';
+		}
 	}
 }
 
@@ -153,6 +169,17 @@ foreach my $name (@keywords)
 
 print $kwdef "};\n\n";
 
+# Emit an array of boolean is bare values
+
+printf $kwdef "static const bool %s_kw_is_bare[] = {\n", $varname;
+
+foreach my $bool (@bare)
+{
+	print $kwdef "\t$bool,\n";
+}
+
+print $kwdef "};\n\n";
+
 # Emit a macro defining the number of keywords.
 # (In some places it's useful to have access to that as a constant.)
 
@@ -173,6 +200,7 @@ printf $kwdef "static " if !$extern;
 printf $kwdef "const ScanKeywordList %s = {\n", $varname;
 printf $kwdef qq|\t%s_kw_string,\n|,            $varname;
 printf $kwdef qq|\t%s_kw_offsets,\n|,           $varname;
+printf $kwdef qq|\t%s_kw_is_bare,\n|,           $varname;
 printf $kwdef qq|\t%s,\n|,                      $funcname;
 printf $kwdef qq|\t%s_NUM_KEYWORDS,\n|,         uc $varname;
 printf $kwdef qq|\t%d\n|,                       $max_len;
-- 
2.21.1 (Apple Git-122.3)

