From db66c658e597ef5977d1e2f4c6f3e00af1651925 Mon Sep 17 00:00:00 2001
From: Mark Dilger <mark.dilger@enterprisedb.com>
Date: Tue, 21 Jul 2020 15:15:49 -0700
Subject: [PATCH v3 2/3] Allow most keywords to be used as implicit column
 labels.

Previously, to use a keyword as a column label in an expression, the
keyword had to be preceded by the token AS.  That is no longer
required for most keywords.  This is accomplished with some changes
to gram.y and by removing support for postfix operators.

These keywords must still be preceded by AS:

    array, as, char, character, create, day, except, fetch, filter,
    for, from, grant, group, having, hour, intersect, into, isnull,
    limit, minute, month, notnull, offset, on, order, over,
    overlaps, precision, returning, second, to, union, varying,
    where, window, with, within, without, year
---
 doc/src/sgml/generate-keywords-table.pl |   2 +-
 src/backend/parser/check_keywords.pl    |  89 ++-
 src/backend/parser/gram.y               | 437 +++++++++++-
 src/backend/parser/scan.l               |   2 +-
 src/common/keywords.c                   |   2 +-
 src/include/parser/kwlist.h             | 902 ++++++++++++------------
 src/interfaces/ecpg/preproc/keywords.c  |   2 +-
 7 files changed, 954 insertions(+), 482 deletions(-)

diff --git a/doc/src/sgml/generate-keywords-table.pl b/doc/src/sgml/generate-keywords-table.pl
index 824b324ef7..6ae6f80c3f 100644
--- a/doc/src/sgml/generate-keywords-table.pl
+++ b/doc/src/sgml/generate-keywords-table.pl
@@ -39,7 +39,7 @@ open my $fh, '<', "$srcdir/../../../src/include/parser/kwlist.h" or die;
 
 while (<$fh>)
 {
-	if (/^PG_KEYWORD\("(\w+)", \w+, (\w+)_KEYWORD\)/)
+	if (/^PG_KEYWORD\("(\w+)", \w+, (\w+)_KEYWORD\, \w+\)/)
 	{
 		$keywords{ uc $1 }{'pg'}{ lc $2 } = 1;
 	}
diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl
index 702c97bba2..98f50c4129 100644
--- a/src/backend/parser/check_keywords.pl
+++ b/src/backend/parser/check_keywords.pl
@@ -21,6 +21,27 @@ sub error
 	return;
 }
 
+sub check_alphabetical_order
+{
+	my ($listname, $list) = @_;
+	my $prevkword = '';
+	my $bare_kword;
+
+	foreach my $kword (@$list)
+	{
+
+		# Some keyword have a _P suffix. Remove it for the comparison.
+		$bare_kword = $kword;
+		$bare_kword =~ s/_P$//;
+		if ($bare_kword le $prevkword)
+		{
+			error
+			  "'$bare_kword' after '$prevkword' in $listname list is misplaced";
+		}
+		$prevkword = $bare_kword;
+	}
+}
+
 $, = ' ';     # set output field separator
 $\ = "\n";    # set output record separator
 
@@ -33,9 +54,11 @@ $keyword_categories{'reserved_keyword'}       = 'RESERVED_KEYWORD';
 open(my $gram, '<', $gram_filename) || die("Could not open : $gram_filename");
 
 my $kcat;
+my $bare;
 my $comment;
 my @arr;
 my %keywords;
+my @bare;
 
 line: while (my $S = <$gram>)
 {
@@ -51,7 +74,7 @@ line: while (my $S = <$gram>)
 	$s = '[/][*]', $S =~ s#$s# /* #g;
 	$s = '[*][/]', $S =~ s#$s# */ #g;
 
-	if (!($kcat))
+	if (!($kcat) && !($bare))
 	{
 
 		# Is this the beginning of a keyword list?
@@ -63,6 +86,10 @@ line: while (my $S = <$gram>)
 				next line;
 			}
 		}
+
+		# Is this the beginning of the bare_label_keyword list?
+		$bare = 1 if ($S =~ m/^bare_label_keyword:/);
+
 		next line;
 	}
 
@@ -97,7 +124,8 @@ line: while (my $S = <$gram>)
 		{
 
 			# end of keyword list
-			$kcat = '';
+			undef $kcat;
+			undef $bare;
 			next;
 		}
 
@@ -107,31 +135,21 @@ line: while (my $S = <$gram>)
 		}
 
 		# Put this keyword into the right list
-		push @{ $keywords{$kcat} }, $arr[$fieldIndexer];
+		if ($bare)
+		{
+			push @bare, $arr[$fieldIndexer];
+		}
+		else
+		{
+			push @{ $keywords{$kcat} }, $arr[$fieldIndexer];
+		}
 	}
 }
 close $gram;
 
 # Check that each keyword list is in alphabetical order (just for neatnik-ism)
-my ($prevkword, $bare_kword);
-foreach my $kcat (keys %keyword_categories)
-{
-	$prevkword = '';
-
-	foreach my $kword (@{ $keywords{$kcat} })
-	{
-
-		# Some keyword have a _P suffix. Remove it for the comparison.
-		$bare_kword = $kword;
-		$bare_kword =~ s/_P$//;
-		if ($bare_kword le $prevkword)
-		{
-			error
-			  "'$bare_kword' after '$prevkword' in $kcat list is misplaced";
-		}
-		$prevkword = $bare_kword;
-	}
-}
+check_alphabetical_order($_, $keywords{$_}) for (keys %keyword_categories);
+check_alphabetical_order('bare_label_keyword', \@bare);
 
 # Transform the keyword lists into hashes.
 # kwhashes is a hash of hashes, keyed by keyword category id,
@@ -147,6 +165,7 @@ while (my ($kcat, $kcat_id) = each(%keyword_categories))
 
 	$kwhashes{$kcat_id} = $hash;
 }
+my %bare = map { $_ => 1 } @bare;
 
 # Now read in kwlist.h
 
@@ -160,11 +179,35 @@ kwlist_line: while (<$kwlist>)
 {
 	my ($line) = $_;
 
-	if ($line =~ /^PG_KEYWORD\(\"(.*)\", (.*), (.*)\)/)
+	if ($line =~ /^PG_KEYWORD\(\"(.*)\", (.*), (.*), (.*)\)/)
 	{
 		my ($kwstring) = $1;
 		my ($kwname)   = $2;
 		my ($kwcat_id) = $3;
+		my ($isbare)   = $4;
+
+		# Check that the isbare value matches gram.y
+		if ($isbare eq 'BARE')
+		{
+			unless ($bare{$kwname})
+			{
+				error
+				  "'$kwstring' in kwlist.h is marked as bare, but is missing from gram.y's bare_label_keyword rule";
+			}
+		}
+		elsif ($isbare eq 'EXPLICIT')
+		{
+			if ($bare{$kwname})
+			{
+				error
+				  "'$kwname' in kwlist.h is marked as explicit, but is listed in gram.y's bare_label_keyword rule";
+			}
+		}
+		else
+		{
+			error
+			  "'$isbare' not recognized in kwlist.h.  Expected either 'BARE' or 'EXPLICIT'";
+		}
 
 		# Check that the list is in alphabetical order (critical!)
 		if ($kwstring le $prevkwstring)
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 18c2c3c2f0..c1947c6aac 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -540,14 +540,15 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
 %type <str>		Sconst comment_text notify_payload
 %type <str>		RoleId opt_boolean_or_string
 %type <list>	var_list
-%type <str>		ColId ColLabel var_name type_function_name param_name
+%type <str>		ColId ColLabel BareColLabel
 %type <str>		NonReservedWord NonReservedWord_or_Sconst
+%type <str>		var_name type_function_name param_name
 %type <str>		createdb_opt_name
 %type <node>	var_value zone_value
 %type <rolespec> auth_ident RoleSpec opt_granted_by
 
 %type <keyword> unreserved_keyword type_func_name_keyword
-%type <keyword> col_name_keyword reserved_keyword
+%type <keyword> col_name_keyword bare_label_keyword reserved_keyword
 
 %type <node>	TableConstraint TableLikeClause
 %type <ival>	TableLikeOptionList TableLikeOption
@@ -14657,7 +14658,7 @@ target_el:	a_expr AS ColLabel
 			 * We support omitting AS only for column labels that aren't
 			 * any known keyword.
 			 */
-			| a_expr IDENT
+			| a_expr BareColLabel
 				{
 					$$ = makeNode(ResTarget);
 					$$->name = $2;
@@ -14985,6 +14986,12 @@ NonReservedWord:	IDENT							{ $$ = $1; }
 			| type_func_name_keyword				{ $$ = pstrdup($1); }
 		;
 
+/* Bare column label --- names that can be column labels without writing "AS".
+ */
+BareColLabel:	IDENT								{ $$ = $1; }
+			| bare_label_keyword					{ $$ = pstrdup($1); }
+		;
+
 /* Column label --- allowed labels in "AS" clauses.
  * This presently includes *all* Postgres keywords.
  */
@@ -14996,6 +15003,428 @@ ColLabel:	IDENT									{ $$ = $1; }
 		;
 
 
+/*
+ * All keywords can be used explicitly as a column label in expressions
+ * like 'SELECT 1234 AS keyword', but only some keywords can be used
+ * implicitly as column labels in expressions like 'SELECT 1234 keyword'.
+ * Those that can be used implicitly should be listed here.
+ *
+ * Keep this in alphabetical order.
+ */
+bare_label_keyword:
+			  ABORT_P
+			| ABSOLUTE_P
+			| ACCESS
+			| ACTION
+			| ADD_P
+			| ADMIN
+			| AFTER
+			| AGGREGATE
+			| ALL
+			| ALSO
+			| ALTER
+			| ALWAYS
+			| ANALYSE
+			| ANALYZE
+			| AND
+			| ANY
+			| ASC
+			| ASSERTION
+			| ASSIGNMENT
+			| ASYMMETRIC
+			| AT
+			| ATTACH
+			| ATTRIBUTE
+			| AUTHORIZATION
+			| BACKWARD
+			| BEFORE
+			| BEGIN_P
+			| BETWEEN
+			| BIGINT
+			| BINARY
+			| BIT
+			| BOOLEAN_P
+			| BOTH
+			| BY
+			| CACHE
+			| CALL
+			| CALLED
+			| CASCADE
+			| CASCADED
+			| CASE
+			| CAST
+			| CATALOG_P
+			| CHAIN
+			| CHARACTERISTICS
+			| CHECK
+			| CHECKPOINT
+			| CLASS
+			| CLOSE
+			| CLUSTER
+			| COALESCE
+			| COLLATE
+			| COLLATION
+			| COLUMN
+			| COLUMNS
+			| COMMENT
+			| COMMENTS
+			| COMMIT
+			| COMMITTED
+			| CONCURRENTLY
+			| CONFIGURATION
+			| CONFLICT
+			| CONNECTION
+			| CONSTRAINT
+			| CONSTRAINTS
+			| CONTENT_P
+			| CONTINUE_P
+			| CONVERSION_P
+			| COPY
+			| COST
+			| CROSS
+			| CSV
+			| CUBE
+			| CURRENT_P
+			| CURRENT_CATALOG
+			| CURRENT_DATE
+			| CURRENT_ROLE
+			| CURRENT_SCHEMA
+			| CURRENT_TIME
+			| CURRENT_TIMESTAMP
+			| CURRENT_USER
+			| CURSOR
+			| CYCLE
+			| DATA_P
+			| DATABASE
+			| DEALLOCATE
+			| DEC
+			| DECIMAL_P
+			| DECLARE
+			| DEFAULT
+			| DEFAULTS
+			| DEFERRABLE
+			| DEFERRED
+			| DEFINER
+			| DELETE_P
+			| DELIMITER
+			| DELIMITERS
+			| DEPENDS
+			| DESC
+			| DETACH
+			| DICTIONARY
+			| DISABLE_P
+			| DISCARD
+			| DISTINCT
+			| DO
+			| DOCUMENT_P
+			| DOMAIN_P
+			| DOUBLE_P
+			| DROP
+			| EACH
+			| ELSE
+			| ENABLE_P
+			| ENCODING
+			| ENCRYPTED
+			| END_P
+			| ENUM_P
+			| ESCAPE
+			| EVENT
+			| EXCLUDE
+			| EXCLUDING
+			| EXCLUSIVE
+			| EXECUTE
+			| EXISTS
+			| EXPLAIN
+			| EXPRESSION
+			| EXTENSION
+			| EXTERNAL
+			| EXTRACT
+			| FALSE_P
+			| FAMILY
+			| FIRST_P
+			| FLOAT_P
+			| FOLLOWING
+			| FORCE
+			| FOREIGN
+			| FORWARD
+			| FREEZE
+			| FULL
+			| FUNCTION
+			| FUNCTIONS
+			| GENERATED
+			| GLOBAL
+			| GRANTED
+			| GREATEST
+			| GROUPING
+			| GROUPS
+			| HANDLER
+			| HEADER_P
+			| HOLD
+			| IDENTITY_P
+			| IF_P
+			| ILIKE
+			| IMMEDIATE
+			| IMMUTABLE
+			| IMPLICIT_P
+			| IMPORT_P
+			| IN_P
+			| INCLUDE
+			| INCLUDING
+			| INCREMENT
+			| INDEX
+			| INDEXES
+			| INHERIT
+			| INHERITS
+			| INITIALLY
+			| INLINE_P
+			| INNER_P
+			| INOUT
+			| INPUT_P
+			| INSENSITIVE
+			| INSERT
+			| INSTEAD
+			| INT_P
+			| INTEGER
+			| INTERVAL
+			| INVOKER
+			| IS
+			| ISOLATION
+			| JOIN
+			| KEY
+			| LABEL
+			| LANGUAGE
+			| LARGE_P
+			| LAST_P
+			| LATERAL_P
+			| LEADING
+			| LEAKPROOF
+			| LEAST
+			| LEFT
+			| LEVEL
+			| LIKE
+			| LISTEN
+			| LOAD
+			| LOCAL
+			| LOCALTIME
+			| LOCALTIMESTAMP
+			| LOCATION
+			| LOCK_P
+			| LOCKED
+			| LOGGED
+			| MAPPING
+			| MATCH
+			| MATERIALIZED
+			| MAXVALUE
+			| METHOD
+			| MINVALUE
+			| MODE
+			| MOVE
+			| NAME_P
+			| NAMES
+			| NATIONAL
+			| NATURAL
+			| NCHAR
+			| NEW
+			| NEXT
+			| NFC
+			| NFD
+			| NFKC
+			| NFKD
+			| NO
+			| NONE
+			| NORMALIZE
+			| NORMALIZED
+			| NOT
+			| NOTHING
+			| NOTIFY
+			| NOWAIT
+			| NULL_P
+			| NULLIF
+			| NULLS_P
+			| NUMERIC
+			| OBJECT_P
+			| OF
+			| OFF
+			| OIDS
+			| OLD
+			| ONLY
+			| OPERATOR
+			| OPTION
+			| OPTIONS
+			| OR
+			| ORDINALITY
+			| OTHERS
+			| OUT_P
+			| OUTER_P
+			| OVERLAY
+			| OVERRIDING
+			| OWNED
+			| OWNER
+			| PARALLEL
+			| PARSER
+			| PARTIAL
+			| PARTITION
+			| PASSING
+			| PASSWORD
+			| PLACING
+			| PLANS
+			| POLICY
+			| POSITION
+			| PRECEDING
+			| PREPARE
+			| PREPARED
+			| PRESERVE
+			| PRIMARY
+			| PRIOR
+			| PRIVILEGES
+			| PROCEDURAL
+			| PROCEDURE
+			| PROCEDURES
+			| PROGRAM
+			| PUBLICATION
+			| QUOTE
+			| RANGE
+			| READ
+			| REAL
+			| REASSIGN
+			| RECHECK
+			| RECURSIVE
+			| REF
+			| REFERENCES
+			| REFERENCING
+			| REFRESH
+			| REINDEX
+			| RELATIVE_P
+			| RELEASE
+			| RENAME
+			| REPEATABLE
+			| REPLACE
+			| REPLICA
+			| RESET
+			| RESTART
+			| RESTRICT
+			| RETURNS
+			| REVOKE
+			| RIGHT
+			| ROLE
+			| ROLLBACK
+			| ROLLUP
+			| ROUTINE
+			| ROUTINES
+			| ROW
+			| ROWS
+			| RULE
+			| SAVEPOINT
+			| SCHEMA
+			| SCHEMAS
+			| SCROLL
+			| SEARCH
+			| SECURITY
+			| SELECT
+			| SEQUENCE
+			| SEQUENCES
+			| SERIALIZABLE
+			| SERVER
+			| SESSION
+			| SESSION_USER
+			| SET
+			| SETOF
+			| SETS
+			| SHARE
+			| SHOW
+			| SIMILAR
+			| SIMPLE
+			| SKIP
+			| SMALLINT
+			| SNAPSHOT
+			| SOME
+			| SQL_P
+			| STABLE
+			| STANDALONE_P
+			| START
+			| STATEMENT
+			| STATISTICS
+			| STDIN
+			| STDOUT
+			| STORAGE
+			| STORED
+			| STRICT_P
+			| STRIP_P
+			| SUBSCRIPTION
+			| SUBSTRING
+			| SUPPORT
+			| SYMMETRIC
+			| SYSID
+			| SYSTEM_P
+			| TABLE
+			| TABLES
+			| TABLESAMPLE
+			| TABLESPACE
+			| TEMP
+			| TEMPLATE
+			| TEMPORARY
+			| TEXT_P
+			| THEN
+			| TIES
+			| TIME
+			| TIMESTAMP
+			| TRAILING
+			| TRANSACTION
+			| TRANSFORM
+			| TREAT
+			| TRIGGER
+			| TRIM
+			| TRUE_P
+			| TRUNCATE
+			| TRUSTED
+			| TYPE_P
+			| TYPES_P
+			| UESCAPE
+			| UNBOUNDED
+			| UNCOMMITTED
+			| UNENCRYPTED
+			| UNIQUE
+			| UNKNOWN
+			| UNLISTEN
+			| UNLOGGED
+			| UNTIL
+			| UPDATE
+			| USER
+			| USING
+			| VACUUM
+			| VALID
+			| VALIDATE
+			| VALIDATOR
+			| VALUE_P
+			| VALUES
+			| VARCHAR
+			| VARIADIC
+			| VERBOSE
+			| VERSION_P
+			| VIEW
+			| VIEWS
+			| VOLATILE
+			| WHEN
+			| WHITESPACE_P
+			| WORK
+			| WRAPPER
+			| WRITE
+			| XML_P
+			| XMLATTRIBUTES
+			| XMLCONCAT
+			| XMLELEMENT
+			| XMLEXISTS
+			| XMLFOREST
+			| XMLNAMESPACES
+			| XMLPARSE
+			| XMLPI
+			| XMLROOT
+			| XMLSERIALIZE
+			| XMLTABLE
+			| YES_P
+			| ZONE
+		;
+
 /*
  * Keyword category lists.  Generally, every keyword present in
  * the Postgres grammar should appear in exactly one of these lists.
@@ -15006,7 +15435,7 @@ ColLabel:	IDENT									{ $$ = $1; }
  *
  * Make sure that each keyword's category in kwlist.h matches where
  * it is listed here.  (Someday we may be able to generate these lists and
- * kwlist.h's table from one source of truth.)
+ * kwlist.h's table from a common master list.)
  */
 
 /* "Unreserved" keywords --- available for use as any kind of name.
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index b1ea0cb538..b26492159b 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -73,7 +73,7 @@ bool		standard_conforming_strings = true;
  * callers need to pass it to scanner_init, if they are using the
  * standard keyword list ScanKeywords.
  */
-#define PG_KEYWORD(kwname, value, category) value,
+#define PG_KEYWORD(kwname, value, category, status) value,
 
 const uint16 ScanKeywordTokens[] = {
 #include "parser/kwlist.h"
diff --git a/src/common/keywords.c b/src/common/keywords.c
index 54ed977096..e64bdf00eb 100644
--- a/src/common/keywords.c
+++ b/src/common/keywords.c
@@ -24,7 +24,7 @@
 
 /* Keyword categories for SQL keywords */
 
-#define PG_KEYWORD(kwname, value, category) category,
+#define PG_KEYWORD(kwname, value, category, status) category,
 
 const uint8 ScanKeywordCategories[SCANKEYWORDS_NUM_KEYWORDS] = {
 #include "parser/kwlist.h"
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 08f22ce211..917e2cffa9 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -24,454 +24,454 @@
  * Note: gen_keywordlist.pl requires the entries to appear in ASCII order.
  */
 
-/* name, value, category */
-PG_KEYWORD("abort", ABORT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("absolute", ABSOLUTE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("access", ACCESS, UNRESERVED_KEYWORD)
-PG_KEYWORD("action", ACTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("add", ADD_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("admin", ADMIN, UNRESERVED_KEYWORD)
-PG_KEYWORD("after", AFTER, UNRESERVED_KEYWORD)
-PG_KEYWORD("aggregate", AGGREGATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("all", ALL, RESERVED_KEYWORD)
-PG_KEYWORD("also", ALSO, UNRESERVED_KEYWORD)
-PG_KEYWORD("alter", ALTER, UNRESERVED_KEYWORD)
-PG_KEYWORD("always", ALWAYS, UNRESERVED_KEYWORD)
-PG_KEYWORD("analyse", ANALYSE, RESERVED_KEYWORD)		/* British spelling */
-PG_KEYWORD("analyze", ANALYZE, RESERVED_KEYWORD)
-PG_KEYWORD("and", AND, RESERVED_KEYWORD)
-PG_KEYWORD("any", ANY, RESERVED_KEYWORD)
-PG_KEYWORD("array", ARRAY, RESERVED_KEYWORD)
-PG_KEYWORD("as", AS, RESERVED_KEYWORD)
-PG_KEYWORD("asc", ASC, RESERVED_KEYWORD)
-PG_KEYWORD("assertion", ASSERTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("assignment", ASSIGNMENT, UNRESERVED_KEYWORD)
-PG_KEYWORD("asymmetric", ASYMMETRIC, RESERVED_KEYWORD)
-PG_KEYWORD("at", AT, UNRESERVED_KEYWORD)
-PG_KEYWORD("attach", ATTACH, UNRESERVED_KEYWORD)
-PG_KEYWORD("attribute", ATTRIBUTE, UNRESERVED_KEYWORD)
-PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD)
-PG_KEYWORD("before", BEFORE, UNRESERVED_KEYWORD)
-PG_KEYWORD("begin", BEGIN_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD)
-PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD)
-PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD)
-PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD)
-PG_KEYWORD("both", BOTH, RESERVED_KEYWORD)
-PG_KEYWORD("by", BY, UNRESERVED_KEYWORD)
-PG_KEYWORD("cache", CACHE, UNRESERVED_KEYWORD)
-PG_KEYWORD("call", CALL, UNRESERVED_KEYWORD)
-PG_KEYWORD("called", CALLED, UNRESERVED_KEYWORD)
-PG_KEYWORD("cascade", CASCADE, UNRESERVED_KEYWORD)
-PG_KEYWORD("cascaded", CASCADED, UNRESERVED_KEYWORD)
-PG_KEYWORD("case", CASE, RESERVED_KEYWORD)
-PG_KEYWORD("cast", CAST, RESERVED_KEYWORD)
-PG_KEYWORD("catalog", CATALOG_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("chain", CHAIN, UNRESERVED_KEYWORD)
-PG_KEYWORD("char", CHAR_P, COL_NAME_KEYWORD)
-PG_KEYWORD("character", CHARACTER, COL_NAME_KEYWORD)
-PG_KEYWORD("characteristics", CHARACTERISTICS, UNRESERVED_KEYWORD)
-PG_KEYWORD("check", CHECK, RESERVED_KEYWORD)
-PG_KEYWORD("checkpoint", CHECKPOINT, UNRESERVED_KEYWORD)
-PG_KEYWORD("class", CLASS, UNRESERVED_KEYWORD)
-PG_KEYWORD("close", CLOSE, UNRESERVED_KEYWORD)
-PG_KEYWORD("cluster", CLUSTER, UNRESERVED_KEYWORD)
-PG_KEYWORD("coalesce", COALESCE, COL_NAME_KEYWORD)
-PG_KEYWORD("collate", COLLATE, RESERVED_KEYWORD)
-PG_KEYWORD("collation", COLLATION, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("column", COLUMN, RESERVED_KEYWORD)
-PG_KEYWORD("columns", COLUMNS, UNRESERVED_KEYWORD)
-PG_KEYWORD("comment", COMMENT, UNRESERVED_KEYWORD)
-PG_KEYWORD("comments", COMMENTS, UNRESERVED_KEYWORD)
-PG_KEYWORD("commit", COMMIT, UNRESERVED_KEYWORD)
-PG_KEYWORD("committed", COMMITTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("concurrently", CONCURRENTLY, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("configuration", CONFIGURATION, UNRESERVED_KEYWORD)
-PG_KEYWORD("conflict", CONFLICT, UNRESERVED_KEYWORD)
-PG_KEYWORD("connection", CONNECTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("constraint", CONSTRAINT, RESERVED_KEYWORD)
-PG_KEYWORD("constraints", CONSTRAINTS, UNRESERVED_KEYWORD)
-PG_KEYWORD("content", CONTENT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("continue", CONTINUE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("copy", COPY, UNRESERVED_KEYWORD)
-PG_KEYWORD("cost", COST, UNRESERVED_KEYWORD)
-PG_KEYWORD("create", CREATE, RESERVED_KEYWORD)
-PG_KEYWORD("cross", CROSS, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("csv", CSV, UNRESERVED_KEYWORD)
-PG_KEYWORD("cube", CUBE, UNRESERVED_KEYWORD)
-PG_KEYWORD("current", CURRENT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("current_catalog", CURRENT_CATALOG, RESERVED_KEYWORD)
-PG_KEYWORD("current_date", CURRENT_DATE, RESERVED_KEYWORD)
-PG_KEYWORD("current_role", CURRENT_ROLE, RESERVED_KEYWORD)
-PG_KEYWORD("current_schema", CURRENT_SCHEMA, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("current_time", CURRENT_TIME, RESERVED_KEYWORD)
-PG_KEYWORD("current_timestamp", CURRENT_TIMESTAMP, RESERVED_KEYWORD)
-PG_KEYWORD("current_user", CURRENT_USER, RESERVED_KEYWORD)
-PG_KEYWORD("cursor", CURSOR, UNRESERVED_KEYWORD)
-PG_KEYWORD("cycle", CYCLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("data", DATA_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("database", DATABASE, UNRESERVED_KEYWORD)
-PG_KEYWORD("day", DAY_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("deallocate", DEALLOCATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("dec", DEC, COL_NAME_KEYWORD)
-PG_KEYWORD("decimal", DECIMAL_P, COL_NAME_KEYWORD)
-PG_KEYWORD("declare", DECLARE, UNRESERVED_KEYWORD)
-PG_KEYWORD("default", DEFAULT, RESERVED_KEYWORD)
-PG_KEYWORD("defaults", DEFAULTS, UNRESERVED_KEYWORD)
-PG_KEYWORD("deferrable", DEFERRABLE, RESERVED_KEYWORD)
-PG_KEYWORD("deferred", DEFERRED, UNRESERVED_KEYWORD)
-PG_KEYWORD("definer", DEFINER, UNRESERVED_KEYWORD)
-PG_KEYWORD("delete", DELETE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("delimiter", DELIMITER, UNRESERVED_KEYWORD)
-PG_KEYWORD("delimiters", DELIMITERS, UNRESERVED_KEYWORD)
-PG_KEYWORD("depends", DEPENDS, UNRESERVED_KEYWORD)
-PG_KEYWORD("desc", DESC, RESERVED_KEYWORD)
-PG_KEYWORD("detach", DETACH, UNRESERVED_KEYWORD)
-PG_KEYWORD("dictionary", DICTIONARY, UNRESERVED_KEYWORD)
-PG_KEYWORD("disable", DISABLE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("discard", DISCARD, UNRESERVED_KEYWORD)
-PG_KEYWORD("distinct", DISTINCT, RESERVED_KEYWORD)
-PG_KEYWORD("do", DO, RESERVED_KEYWORD)
-PG_KEYWORD("document", DOCUMENT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("domain", DOMAIN_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("double", DOUBLE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("drop", DROP, UNRESERVED_KEYWORD)
-PG_KEYWORD("each", EACH, UNRESERVED_KEYWORD)
-PG_KEYWORD("else", ELSE, RESERVED_KEYWORD)
-PG_KEYWORD("enable", ENABLE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("encoding", ENCODING, UNRESERVED_KEYWORD)
-PG_KEYWORD("encrypted", ENCRYPTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("end", END_P, RESERVED_KEYWORD)
-PG_KEYWORD("enum", ENUM_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("escape", ESCAPE, UNRESERVED_KEYWORD)
-PG_KEYWORD("event", EVENT, UNRESERVED_KEYWORD)
-PG_KEYWORD("except", EXCEPT, RESERVED_KEYWORD)
-PG_KEYWORD("exclude", EXCLUDE, UNRESERVED_KEYWORD)
-PG_KEYWORD("excluding", EXCLUDING, UNRESERVED_KEYWORD)
-PG_KEYWORD("exclusive", EXCLUSIVE, UNRESERVED_KEYWORD)
-PG_KEYWORD("execute", EXECUTE, UNRESERVED_KEYWORD)
-PG_KEYWORD("exists", EXISTS, COL_NAME_KEYWORD)
-PG_KEYWORD("explain", EXPLAIN, UNRESERVED_KEYWORD)
-PG_KEYWORD("expression", EXPRESSION, UNRESERVED_KEYWORD)
-PG_KEYWORD("extension", EXTENSION, UNRESERVED_KEYWORD)
-PG_KEYWORD("external", EXTERNAL, UNRESERVED_KEYWORD)
-PG_KEYWORD("extract", EXTRACT, COL_NAME_KEYWORD)
-PG_KEYWORD("false", FALSE_P, RESERVED_KEYWORD)
-PG_KEYWORD("family", FAMILY, UNRESERVED_KEYWORD)
-PG_KEYWORD("fetch", FETCH, RESERVED_KEYWORD)
-PG_KEYWORD("filter", FILTER, UNRESERVED_KEYWORD)
-PG_KEYWORD("first", FIRST_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("float", FLOAT_P, COL_NAME_KEYWORD)
-PG_KEYWORD("following", FOLLOWING, UNRESERVED_KEYWORD)
-PG_KEYWORD("for", FOR, RESERVED_KEYWORD)
-PG_KEYWORD("force", FORCE, UNRESERVED_KEYWORD)
-PG_KEYWORD("foreign", FOREIGN, RESERVED_KEYWORD)
-PG_KEYWORD("forward", FORWARD, UNRESERVED_KEYWORD)
-PG_KEYWORD("freeze", FREEZE, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("from", FROM, RESERVED_KEYWORD)
-PG_KEYWORD("full", FULL, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("function", FUNCTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("functions", FUNCTIONS, UNRESERVED_KEYWORD)
-PG_KEYWORD("generated", GENERATED, UNRESERVED_KEYWORD)
-PG_KEYWORD("global", GLOBAL, UNRESERVED_KEYWORD)
-PG_KEYWORD("grant", GRANT, RESERVED_KEYWORD)
-PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD)
-PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD)
-PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD)
-PG_KEYWORD("groups", GROUPS, UNRESERVED_KEYWORD)
-PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD)
-PG_KEYWORD("having", HAVING, RESERVED_KEYWORD)
-PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD)
-PG_KEYWORD("hour", HOUR_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("identity", IDENTITY_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("if", IF_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("ilike", ILIKE, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("immediate", IMMEDIATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("immutable", IMMUTABLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("implicit", IMPLICIT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("import", IMPORT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("in", IN_P, RESERVED_KEYWORD)
-PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD)
-PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD)
-PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD)
-PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD)
-PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD)
-PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD)
-PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD)
-PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD)
-PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD)
-PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("insensitive", INSENSITIVE, UNRESERVED_KEYWORD)
-PG_KEYWORD("insert", INSERT, UNRESERVED_KEYWORD)
-PG_KEYWORD("instead", INSTEAD, UNRESERVED_KEYWORD)
-PG_KEYWORD("int", INT_P, COL_NAME_KEYWORD)
-PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD)
-PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD)
-PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD)
-PG_KEYWORD("into", INTO, RESERVED_KEYWORD)
-PG_KEYWORD("invoker", INVOKER, UNRESERVED_KEYWORD)
-PG_KEYWORD("is", IS, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD)
-PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD)
-PG_KEYWORD("label", LABEL, UNRESERVED_KEYWORD)
-PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD)
-PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("lateral", LATERAL_P, RESERVED_KEYWORD)
-PG_KEYWORD("leading", LEADING, RESERVED_KEYWORD)
-PG_KEYWORD("leakproof", LEAKPROOF, UNRESERVED_KEYWORD)
-PG_KEYWORD("least", LEAST, COL_NAME_KEYWORD)
-PG_KEYWORD("left", LEFT, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("level", LEVEL, UNRESERVED_KEYWORD)
-PG_KEYWORD("like", LIKE, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("limit", LIMIT, RESERVED_KEYWORD)
-PG_KEYWORD("listen", LISTEN, UNRESERVED_KEYWORD)
-PG_KEYWORD("load", LOAD, UNRESERVED_KEYWORD)
-PG_KEYWORD("local", LOCAL, UNRESERVED_KEYWORD)
-PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD)
-PG_KEYWORD("localtimestamp", LOCALTIMESTAMP, RESERVED_KEYWORD)
-PG_KEYWORD("location", LOCATION, UNRESERVED_KEYWORD)
-PG_KEYWORD("lock", LOCK_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("locked", LOCKED, UNRESERVED_KEYWORD)
-PG_KEYWORD("logged", LOGGED, UNRESERVED_KEYWORD)
-PG_KEYWORD("mapping", MAPPING, UNRESERVED_KEYWORD)
-PG_KEYWORD("match", MATCH, UNRESERVED_KEYWORD)
-PG_KEYWORD("materialized", MATERIALIZED, UNRESERVED_KEYWORD)
-PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD)
-PG_KEYWORD("method", METHOD, UNRESERVED_KEYWORD)
-PG_KEYWORD("minute", MINUTE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD)
-PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD)
-PG_KEYWORD("month", MONTH_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD)
-PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("names", NAMES, UNRESERVED_KEYWORD)
-PG_KEYWORD("national", NATIONAL, COL_NAME_KEYWORD)
-PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("nchar", NCHAR, COL_NAME_KEYWORD)
-PG_KEYWORD("new", NEW, UNRESERVED_KEYWORD)
-PG_KEYWORD("next", NEXT, UNRESERVED_KEYWORD)
-PG_KEYWORD("nfc", NFC, UNRESERVED_KEYWORD)
-PG_KEYWORD("nfd", NFD, UNRESERVED_KEYWORD)
-PG_KEYWORD("nfkc", NFKC, UNRESERVED_KEYWORD)
-PG_KEYWORD("nfkd", NFKD, UNRESERVED_KEYWORD)
-PG_KEYWORD("no", NO, UNRESERVED_KEYWORD)
-PG_KEYWORD("none", NONE, COL_NAME_KEYWORD)
-PG_KEYWORD("normalize", NORMALIZE, COL_NAME_KEYWORD)
-PG_KEYWORD("normalized", NORMALIZED, UNRESERVED_KEYWORD)
-PG_KEYWORD("not", NOT, RESERVED_KEYWORD)
-PG_KEYWORD("nothing", NOTHING, UNRESERVED_KEYWORD)
-PG_KEYWORD("notify", NOTIFY, UNRESERVED_KEYWORD)
-PG_KEYWORD("notnull", NOTNULL, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("nowait", NOWAIT, UNRESERVED_KEYWORD)
-PG_KEYWORD("null", NULL_P, RESERVED_KEYWORD)
-PG_KEYWORD("nullif", NULLIF, COL_NAME_KEYWORD)
-PG_KEYWORD("nulls", NULLS_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("numeric", NUMERIC, COL_NAME_KEYWORD)
-PG_KEYWORD("object", OBJECT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("of", OF, UNRESERVED_KEYWORD)
-PG_KEYWORD("off", OFF, UNRESERVED_KEYWORD)
-PG_KEYWORD("offset", OFFSET, RESERVED_KEYWORD)
-PG_KEYWORD("oids", OIDS, UNRESERVED_KEYWORD)
-PG_KEYWORD("old", OLD, UNRESERVED_KEYWORD)
-PG_KEYWORD("on", ON, RESERVED_KEYWORD)
-PG_KEYWORD("only", ONLY, RESERVED_KEYWORD)
-PG_KEYWORD("operator", OPERATOR, UNRESERVED_KEYWORD)
-PG_KEYWORD("option", OPTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("options", OPTIONS, UNRESERVED_KEYWORD)
-PG_KEYWORD("or", OR, RESERVED_KEYWORD)
-PG_KEYWORD("order", ORDER, RESERVED_KEYWORD)
-PG_KEYWORD("ordinality", ORDINALITY, UNRESERVED_KEYWORD)
-PG_KEYWORD("others", OTHERS, UNRESERVED_KEYWORD)
-PG_KEYWORD("out", OUT_P, COL_NAME_KEYWORD)
-PG_KEYWORD("outer", OUTER_P, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("over", OVER, UNRESERVED_KEYWORD)
-PG_KEYWORD("overlaps", OVERLAPS, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("overlay", OVERLAY, COL_NAME_KEYWORD)
-PG_KEYWORD("overriding", OVERRIDING, UNRESERVED_KEYWORD)
-PG_KEYWORD("owned", OWNED, UNRESERVED_KEYWORD)
-PG_KEYWORD("owner", OWNER, UNRESERVED_KEYWORD)
-PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD)
-PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD)
-PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD)
-PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD)
-PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD)
-PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD)
-PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD)
-PG_KEYWORD("plans", PLANS, UNRESERVED_KEYWORD)
-PG_KEYWORD("policy", POLICY, UNRESERVED_KEYWORD)
-PG_KEYWORD("position", POSITION, COL_NAME_KEYWORD)
-PG_KEYWORD("preceding", PRECEDING, UNRESERVED_KEYWORD)
-PG_KEYWORD("precision", PRECISION, COL_NAME_KEYWORD)
-PG_KEYWORD("prepare", PREPARE, UNRESERVED_KEYWORD)
-PG_KEYWORD("prepared", PREPARED, UNRESERVED_KEYWORD)
-PG_KEYWORD("preserve", PRESERVE, UNRESERVED_KEYWORD)
-PG_KEYWORD("primary", PRIMARY, RESERVED_KEYWORD)
-PG_KEYWORD("prior", PRIOR, UNRESERVED_KEYWORD)
-PG_KEYWORD("privileges", PRIVILEGES, UNRESERVED_KEYWORD)
-PG_KEYWORD("procedural", PROCEDURAL, UNRESERVED_KEYWORD)
-PG_KEYWORD("procedure", PROCEDURE, UNRESERVED_KEYWORD)
-PG_KEYWORD("procedures", PROCEDURES, UNRESERVED_KEYWORD)
-PG_KEYWORD("program", PROGRAM, UNRESERVED_KEYWORD)
-PG_KEYWORD("publication", PUBLICATION, UNRESERVED_KEYWORD)
-PG_KEYWORD("quote", QUOTE, UNRESERVED_KEYWORD)
-PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD)
-PG_KEYWORD("read", READ, UNRESERVED_KEYWORD)
-PG_KEYWORD("real", REAL, COL_NAME_KEYWORD)
-PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD)
-PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD)
-PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD)
-PG_KEYWORD("ref", REF, UNRESERVED_KEYWORD)
-PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD)
-PG_KEYWORD("referencing", REFERENCING, UNRESERVED_KEYWORD)
-PG_KEYWORD("refresh", REFRESH, UNRESERVED_KEYWORD)
-PG_KEYWORD("reindex", REINDEX, UNRESERVED_KEYWORD)
-PG_KEYWORD("relative", RELATIVE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("release", RELEASE, UNRESERVED_KEYWORD)
-PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD)
-PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD)
-PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD)
-PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD)
-PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD)
-PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD)
-PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD)
-PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD)
-PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD)
-PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD)
-PG_KEYWORD("rollup", ROLLUP, UNRESERVED_KEYWORD)
-PG_KEYWORD("routine", ROUTINE, UNRESERVED_KEYWORD)
-PG_KEYWORD("routines", ROUTINES, UNRESERVED_KEYWORD)
-PG_KEYWORD("row", ROW, COL_NAME_KEYWORD)
-PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD)
-PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD)
-PG_KEYWORD("savepoint", SAVEPOINT, UNRESERVED_KEYWORD)
-PG_KEYWORD("schema", SCHEMA, UNRESERVED_KEYWORD)
-PG_KEYWORD("schemas", SCHEMAS, UNRESERVED_KEYWORD)
-PG_KEYWORD("scroll", SCROLL, UNRESERVED_KEYWORD)
-PG_KEYWORD("search", SEARCH, UNRESERVED_KEYWORD)
-PG_KEYWORD("second", SECOND_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("security", SECURITY, UNRESERVED_KEYWORD)
-PG_KEYWORD("select", SELECT, RESERVED_KEYWORD)
-PG_KEYWORD("sequence", SEQUENCE, UNRESERVED_KEYWORD)
-PG_KEYWORD("sequences", SEQUENCES, UNRESERVED_KEYWORD)
-PG_KEYWORD("serializable", SERIALIZABLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("server", SERVER, UNRESERVED_KEYWORD)
-PG_KEYWORD("session", SESSION, UNRESERVED_KEYWORD)
-PG_KEYWORD("session_user", SESSION_USER, RESERVED_KEYWORD)
-PG_KEYWORD("set", SET, UNRESERVED_KEYWORD)
-PG_KEYWORD("setof", SETOF, COL_NAME_KEYWORD)
-PG_KEYWORD("sets", SETS, UNRESERVED_KEYWORD)
-PG_KEYWORD("share", SHARE, UNRESERVED_KEYWORD)
-PG_KEYWORD("show", SHOW, UNRESERVED_KEYWORD)
-PG_KEYWORD("similar", SIMILAR, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("simple", SIMPLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("skip", SKIP, UNRESERVED_KEYWORD)
-PG_KEYWORD("smallint", SMALLINT, COL_NAME_KEYWORD)
-PG_KEYWORD("snapshot", SNAPSHOT, UNRESERVED_KEYWORD)
-PG_KEYWORD("some", SOME, RESERVED_KEYWORD)
-PG_KEYWORD("sql", SQL_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("stable", STABLE, UNRESERVED_KEYWORD)
-PG_KEYWORD("standalone", STANDALONE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("start", START, UNRESERVED_KEYWORD)
-PG_KEYWORD("statement", STATEMENT, UNRESERVED_KEYWORD)
-PG_KEYWORD("statistics", STATISTICS, UNRESERVED_KEYWORD)
-PG_KEYWORD("stdin", STDIN, UNRESERVED_KEYWORD)
-PG_KEYWORD("stdout", STDOUT, UNRESERVED_KEYWORD)
-PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD)
-PG_KEYWORD("stored", STORED, UNRESERVED_KEYWORD)
-PG_KEYWORD("strict", STRICT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("strip", STRIP_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("subscription", SUBSCRIPTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("substring", SUBSTRING, COL_NAME_KEYWORD)
-PG_KEYWORD("support", SUPPORT, UNRESERVED_KEYWORD)
-PG_KEYWORD("symmetric", SYMMETRIC, RESERVED_KEYWORD)
-PG_KEYWORD("sysid", SYSID, UNRESERVED_KEYWORD)
-PG_KEYWORD("system", SYSTEM_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("table", TABLE, RESERVED_KEYWORD)
-PG_KEYWORD("tables", TABLES, UNRESERVED_KEYWORD)
-PG_KEYWORD("tablesample", TABLESAMPLE, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("tablespace", TABLESPACE, UNRESERVED_KEYWORD)
-PG_KEYWORD("temp", TEMP, UNRESERVED_KEYWORD)
-PG_KEYWORD("template", TEMPLATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("temporary", TEMPORARY, UNRESERVED_KEYWORD)
-PG_KEYWORD("text", TEXT_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("then", THEN, RESERVED_KEYWORD)
-PG_KEYWORD("ties", TIES, UNRESERVED_KEYWORD)
-PG_KEYWORD("time", TIME, COL_NAME_KEYWORD)
-PG_KEYWORD("timestamp", TIMESTAMP, COL_NAME_KEYWORD)
-PG_KEYWORD("to", TO, RESERVED_KEYWORD)
-PG_KEYWORD("trailing", TRAILING, RESERVED_KEYWORD)
-PG_KEYWORD("transaction", TRANSACTION, UNRESERVED_KEYWORD)
-PG_KEYWORD("transform", TRANSFORM, UNRESERVED_KEYWORD)
-PG_KEYWORD("treat", TREAT, COL_NAME_KEYWORD)
-PG_KEYWORD("trigger", TRIGGER, UNRESERVED_KEYWORD)
-PG_KEYWORD("trim", TRIM, COL_NAME_KEYWORD)
-PG_KEYWORD("true", TRUE_P, RESERVED_KEYWORD)
-PG_KEYWORD("truncate", TRUNCATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("trusted", TRUSTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("type", TYPE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("types", TYPES_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("uescape", UESCAPE, UNRESERVED_KEYWORD)
-PG_KEYWORD("unbounded", UNBOUNDED, UNRESERVED_KEYWORD)
-PG_KEYWORD("uncommitted", UNCOMMITTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("unencrypted", UNENCRYPTED, UNRESERVED_KEYWORD)
-PG_KEYWORD("union", UNION, RESERVED_KEYWORD)
-PG_KEYWORD("unique", UNIQUE, RESERVED_KEYWORD)
-PG_KEYWORD("unknown", UNKNOWN, UNRESERVED_KEYWORD)
-PG_KEYWORD("unlisten", UNLISTEN, UNRESERVED_KEYWORD)
-PG_KEYWORD("unlogged", UNLOGGED, UNRESERVED_KEYWORD)
-PG_KEYWORD("until", UNTIL, UNRESERVED_KEYWORD)
-PG_KEYWORD("update", UPDATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("user", USER, RESERVED_KEYWORD)
-PG_KEYWORD("using", USING, RESERVED_KEYWORD)
-PG_KEYWORD("vacuum", VACUUM, UNRESERVED_KEYWORD)
-PG_KEYWORD("valid", VALID, UNRESERVED_KEYWORD)
-PG_KEYWORD("validate", VALIDATE, UNRESERVED_KEYWORD)
-PG_KEYWORD("validator", VALIDATOR, UNRESERVED_KEYWORD)
-PG_KEYWORD("value", VALUE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("values", VALUES, COL_NAME_KEYWORD)
-PG_KEYWORD("varchar", VARCHAR, COL_NAME_KEYWORD)
-PG_KEYWORD("variadic", VARIADIC, RESERVED_KEYWORD)
-PG_KEYWORD("varying", VARYING, UNRESERVED_KEYWORD)
-PG_KEYWORD("verbose", VERBOSE, TYPE_FUNC_NAME_KEYWORD)
-PG_KEYWORD("version", VERSION_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("view", VIEW, UNRESERVED_KEYWORD)
-PG_KEYWORD("views", VIEWS, UNRESERVED_KEYWORD)
-PG_KEYWORD("volatile", VOLATILE, UNRESERVED_KEYWORD)
-PG_KEYWORD("when", WHEN, RESERVED_KEYWORD)
-PG_KEYWORD("where", WHERE, RESERVED_KEYWORD)
-PG_KEYWORD("whitespace", WHITESPACE_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("window", WINDOW, RESERVED_KEYWORD)
-PG_KEYWORD("with", WITH, RESERVED_KEYWORD)
-PG_KEYWORD("within", WITHIN, UNRESERVED_KEYWORD)
-PG_KEYWORD("without", WITHOUT, UNRESERVED_KEYWORD)
-PG_KEYWORD("work", WORK, UNRESERVED_KEYWORD)
-PG_KEYWORD("wrapper", WRAPPER, UNRESERVED_KEYWORD)
-PG_KEYWORD("write", WRITE, UNRESERVED_KEYWORD)
-PG_KEYWORD("xml", XML_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("xmlattributes", XMLATTRIBUTES, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlconcat", XMLCONCAT, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlelement", XMLELEMENT, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlexists", XMLEXISTS, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlforest", XMLFOREST, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlnamespaces", XMLNAMESPACES, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlparse", XMLPARSE, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlpi", XMLPI, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlroot", XMLROOT, COL_NAME_KEYWORD)
-PG_KEYWORD("xmlserialize", XMLSERIALIZE, COL_NAME_KEYWORD)
-PG_KEYWORD("xmltable", XMLTABLE, COL_NAME_KEYWORD)
-PG_KEYWORD("year", YEAR_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("yes", YES_P, UNRESERVED_KEYWORD)
-PG_KEYWORD("zone", ZONE, UNRESERVED_KEYWORD)
+/* 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)
diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c
index f82764aeb9..34a2f8ba2b 100644
--- a/src/interfaces/ecpg/preproc/keywords.c
+++ b/src/interfaces/ecpg/preproc/keywords.c
@@ -29,7 +29,7 @@
 #include "preproc_extern.h"
 #include "preproc.h"
 
-#define PG_KEYWORD(kwname, value, category) value,
+#define PG_KEYWORD(kwname, value, category, status) value,
 
 const uint16 SQLScanKeywordTokens[] = {
 #include "parser/kwlist.h"
-- 
2.21.1 (Apple Git-122.3)

