From a77c305918223854a267c0c0df48df814784d97c Mon Sep 17 00:00:00 2001
From: Mark Dilger <mark.dilger@enterprisedb.com>
Date: Fri, 10 Jul 2020 08:30:27 -0700
Subject: [PATCH v2] 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

The postfix operator removal constitutes a backward compatibility
break.
---
 .../postgres_fdw/expected/postgres_fdw.out    |   8 +-
 contrib/postgres_fdw/sql/postgres_fdw.sql     |   2 +-
 doc/src/sgml/generate-keywords-table.pl       |   2 +-
 src/backend/commands/operatorcmds.c           |  18 +-
 src/backend/parser/check_keywords.pl          |  46 +-
 src/backend/parser/gram.y                     | 474 ++++++++-
 src/backend/parser/scan.l                     |   2 +-
 src/backend/utils/adt/misc.c                  |   4 +
 src/common/keywords.c                         |   2 +-
 src/include/common/keywords.h                 |   7 +-
 src/include/parser/kwlist.h                   | 900 +++++++++---------
 src/interfaces/ecpg/preproc/keywords.c        |   2 +-
 src/test/regress/expected/create_operator.out |  20 +-
 src/test/regress/expected/numeric.out         |  27 +-
 src/test/regress/sql/create_operator.sql      |   2 +-
 src/test/regress/sql/numeric.sql              |  16 +-
 16 files changed, 1030 insertions(+), 502 deletions(-)

diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
index 82fc1290ef..4306ae31c9 100644
--- a/contrib/postgres_fdw/expected/postgres_fdw.out
+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
@@ -653,12 +653,12 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1;          -- Op
    Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (("C 1" = (- "C 1")))
 (3 rows)
 
-EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!;           -- OpExpr(r)
-                                                QUERY PLAN                                                
-----------------------------------------------------------------------------------------------------------
+EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = !!c1;          -- OpExpr(r)
+                                                QUERY PLAN                                                 
+-----------------------------------------------------------------------------------------------------------
  Foreign Scan on public.ft1 t1
    Output: c1, c2, c3, c4, c5, c6, c7, c8
-   Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE ((1::numeric = ("C 1" !)))
+   Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE ((1::numeric = (!! "C 1")))
 (3 rows)
 
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 83971665e3..a8e58a8f24 100644
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -307,7 +307,7 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NULL;        -- Nu
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 IS NOT NULL;    -- NullTest
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE round(abs(c1), 0) = 1; -- FuncExpr
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1;          -- OpExpr(l)
-EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!;           -- OpExpr(r)
+EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = !!c1;          -- OpExpr(r)
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr
 EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef
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/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c
index 0a53e9b93e..cb7ffda4bd 100644
--- a/src/backend/commands/operatorcmds.c
+++ b/src/backend/commands/operatorcmds.c
@@ -168,10 +168,26 @@ DefineOperator(List *names, List *parameters)
 	if (typeName2)
 		typeId2 = typenameTypeId(NULL, typeName2);
 
+	/*
+	 * If neither argument is specified, do not mention postfix operator
+	 * discontinuation, as the user is unlikely to have meant to create a
+	 * postfix operator.  It is more likely they simply neglected to mention
+	 * the args.
+	 */
 	if (!OidIsValid(typeId1) && !OidIsValid(typeId2))
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
-				 errmsg("at least one of leftarg or rightarg must be specified")));
+				 errmsg("at least rightarg must be specified")));
+
+	/*
+	 * But if only the right arg is missing, they probably do intend to create
+	 * a postfix operator, so give them a hint about why that no longer works.
+	 */
+	if (!OidIsValid(typeId2))
+		ereport(ERROR,
+				(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
+				 errmsg("rightarg must be specified"),
+				 errhint("postfix operator support has been discontinued")));
 
 	if (typeName1)
 	{
diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl
index 702c97bba2..550f103c0b 100644
--- a/src/backend/parser/check_keywords.pl
+++ b/src/backend/parser/check_keywords.pl
@@ -26,6 +26,7 @@ $\ = "\n";    # set output record separator
 
 my %keyword_categories;
 $keyword_categories{'unreserved_keyword'}     = 'UNRESERVED_KEYWORD';
+$keyword_categories{'non_label_keyword'}      = 'NON_LABEL_KEYWORD';
 $keyword_categories{'col_name_keyword'}       = 'COL_NAME_KEYWORD';
 $keyword_categories{'type_func_name_keyword'} = 'TYPE_FUNC_NAME_KEYWORD';
 $keyword_categories{'reserved_keyword'}       = 'RESERVED_KEYWORD';
@@ -36,6 +37,7 @@ my $kcat;
 my $comment;
 my @arr;
 my %keywords;
+my ($implicit, %implicit);
 
 line: while (my $S = <$gram>)
 {
@@ -51,7 +53,7 @@ line: while (my $S = <$gram>)
 	$s = '[/][*]', $S =~ s#$s# /* #g;
 	$s = '[*][/]', $S =~ s#$s# */ #g;
 
-	if (!($kcat))
+	if (!($kcat) && !($implicit))
 	{
 
 		# Is this the beginning of a keyword list?
@@ -63,6 +65,10 @@ line: while (my $S = <$gram>)
 				next line;
 			}
 		}
+		if ($S =~ m/^implicit_column_label:/)
+		{
+			$implicit = 1;
+		}
 		next line;
 	}
 
@@ -98,6 +104,7 @@ line: while (my $S = <$gram>)
 
 			# end of keyword list
 			$kcat = '';
+			undef $implicit;
 			next;
 		}
 
@@ -107,7 +114,14 @@ line: while (my $S = <$gram>)
 		}
 
 		# Put this keyword into the right list
-		push @{ $keywords{$kcat} }, $arr[$fieldIndexer];
+		if ($implicit)
+		{
+			$implicit{$arr[$fieldIndexer]} = 1;
+		}
+		else
+		{
+			push @{ $keywords{$kcat} }, $arr[$fieldIndexer];
+		}
 	}
 }
 close $gram;
@@ -156,15 +170,17 @@ open(my $kwlist, '<', $kwlist_filename)
 my $prevkwstring = '';
 my $bare_kwname;
 my %kwhash;
+my %status;
 kwlist_line: while (<$kwlist>)
 {
 	my ($line) = $_;
 
-	if ($line =~ /^PG_KEYWORD\(\"(.*)\", (.*), (.*)\)/)
+	if ($line =~ /^PG_KEYWORD\(\"(.*)\", (.*), (.*), (.*)\)/)
 	{
 		my ($kwstring) = $1;
 		my ($kwname)   = $2;
 		my ($kwcat_id) = $3;
+		$status{$kwname} = $4;
 
 		# Check that the list is in alphabetical order (critical!)
 		if ($kwstring le $prevkwstring)
@@ -234,4 +250,28 @@ while (my ($kwcat, $kwcat_id) = each(%keyword_categories))
 	}
 }
 
+# Check that all keywords in gram.y's implicit_column_label rule are listed as
+# such in kwlist.h
+for my $kw (sort keys %implicit)
+{
+	if (! defined $status{$kw})
+	{
+		error "'$kw'  in kwlist.h";
+	}
+	elsif ($status{$kw} ne 'IMPLICIT_COLUMN_LABEL')
+	{
+		error "'$kw' from gram.y's implicit_column_label rule " .
+			  "listed as $status{$kw} in kwlist.h";
+	}
+}
+
+# Check that all keywords labeled as implicit are indeed part of gram.y's
+# implicit_column_label rule
+for my $kw (sort grep { $status{$_} eq 'IMPLICIT_COLUMN_LABEL' } keys %status)
+{
+	error "'$kw' listed as implicit in kwlist.h is not part of " .
+		  "gram.y's implicit_column_label rule"
+		unless($implicit{$kw});
+}
+
 exit $errors;
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 1ea1fba43a..e947a6367d 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> unreserved_keyword non_label_keyword type_func_name_keyword
+%type <keyword> col_name_keyword implicit_column_label reserved_keyword
 
 %type <node>	TableConstraint TableLikeClause
 %type <ival>	TableLikeOptionList TableLikeOption
@@ -741,7 +742,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
 %nonassoc	'<' '>' '=' LESS_EQUALS GREATER_EQUALS NOT_EQUALS
 %nonassoc	BETWEEN IN_P LIKE ILIKE SIMILAR NOT_LA
 %nonassoc	ESCAPE			/* ESCAPE must be just above LIKE/ILIKE/SIMILAR */
-%left		POSTFIXOP		/* dummy for postfix Op rules */
 /*
  * To support target_el without AS, we must give IDENT an explicit priority
  * between POSTFIXOP and Op.  We can safely assign the same priority to
@@ -12989,8 +12989,6 @@ a_expr:		c_expr									{ $$ = $1; }
 				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $2, $1, $3, @2); }
 			| qual_Op a_expr					%prec Op
 				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $1, NULL, $2, @1); }
-			| a_expr qual_Op					%prec POSTFIXOP
-				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $2, $1, NULL, @2); }
 
 			| a_expr AND a_expr
 				{ $$ = makeAndExpr($1, $3, @2); }
@@ -13404,8 +13402,6 @@ b_expr:		c_expr
 				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $2, $1, $3, @2); }
 			| qual_Op b_expr					%prec Op
 				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $1, NULL, $2, @1); }
-			| b_expr qual_Op					%prec POSTFIXOP
-				{ $$ = (Node *) makeA_Expr(AEXPR_OP, $2, $1, NULL, @2); }
 			| b_expr IS DISTINCT FROM b_expr		%prec IS
 				{
 					$$ = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", $1, $5, @2);
@@ -14667,7 +14663,7 @@ target_el:	a_expr AS ColLabel
 			 * as an infix expression, which we accomplish by assigning
 			 * IDENT a precedence higher than POSTFIXOP.
 			 */
-			| a_expr IDENT
+			| a_expr BareColLabel
 				{
 					$$ = makeNode(ResTarget);
 					$$->name = $2;
@@ -14977,6 +14973,7 @@ role_list:	RoleSpec
  */
 ColId:		IDENT									{ $$ = $1; }
 			| unreserved_keyword					{ $$ = pstrdup($1); }
+			| non_label_keyword						{ $$ = pstrdup($1); }
 			| col_name_keyword						{ $$ = pstrdup($1); }
 		;
 
@@ -14984,6 +14981,7 @@ ColId:		IDENT									{ $$ = $1; }
  */
 type_function_name:	IDENT							{ $$ = $1; }
 			| unreserved_keyword					{ $$ = pstrdup($1); }
+			| non_label_keyword						{ $$ = pstrdup($1); }
 			| type_func_name_keyword				{ $$ = pstrdup($1); }
 		;
 
@@ -14991,21 +14989,451 @@ type_function_name:	IDENT							{ $$ = $1; }
  */
 NonReservedWord:	IDENT							{ $$ = $1; }
 			| unreserved_keyword					{ $$ = pstrdup($1); }
+			| non_label_keyword						{ $$ = pstrdup($1); }
 			| col_name_keyword						{ $$ = pstrdup($1); }
 			| type_func_name_keyword				{ $$ = pstrdup($1); }
 		;
 
+/* Bare column label --- names that can be column labels without writing "AS".
+ */
+BareColLabel:	IDENT								{ $$ = $1; }
+			| implicit_column_label					{ $$ = pstrdup($1); }
+		;
+
 /* Column label --- allowed labels in "AS" clauses.
  * This presently includes *all* Postgres keywords.
  */
 ColLabel:	IDENT									{ $$ = $1; }
 			| unreserved_keyword					{ $$ = pstrdup($1); }
+			| non_label_keyword						{ $$ = pstrdup($1); }
 			| col_name_keyword						{ $$ = pstrdup($1); }
 			| type_func_name_keyword				{ $$ = pstrdup($1); }
 			| reserved_keyword						{ $$ = pstrdup($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.
+ */
+implicit_column_label:
+			  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.
@@ -15075,7 +15503,6 @@ unreserved_keyword:
 			| CYCLE
 			| DATA_P
 			| DATABASE
-			| DAY_P
 			| DEALLOCATE
 			| DECLARE
 			| DEFAULTS
@@ -15109,7 +15536,6 @@ unreserved_keyword:
 			| EXTENSION
 			| EXTERNAL
 			| FAMILY
-			| FILTER
 			| FIRST_P
 			| FOLLOWING
 			| FORCE
@@ -15123,7 +15549,6 @@ unreserved_keyword:
 			| HANDLER
 			| HEADER_P
 			| HOLD
-			| HOUR_P
 			| IDENTITY_P
 			| IF_P
 			| IMMEDIATE
@@ -15163,10 +15588,8 @@ unreserved_keyword:
 			| MATERIALIZED
 			| MAXVALUE
 			| METHOD
-			| MINUTE_P
 			| MINVALUE
 			| MODE
-			| MONTH_P
 			| MOVE
 			| NAME_P
 			| NAMES
@@ -15192,7 +15615,6 @@ unreserved_keyword:
 			| OPTIONS
 			| ORDINALITY
 			| OTHERS
-			| OVER
 			| OVERRIDING
 			| OWNED
 			| OWNER
@@ -15248,7 +15670,6 @@ unreserved_keyword:
 			| SCHEMAS
 			| SCROLL
 			| SEARCH
-			| SECOND_P
 			| SECURITY
 			| SEQUENCE
 			| SEQUENCES
@@ -15306,23 +15727,36 @@ unreserved_keyword:
 			| VALIDATE
 			| VALIDATOR
 			| VALUE_P
-			| VARYING
 			| VERSION_P
 			| VIEW
 			| VIEWS
 			| VOLATILE
 			| WHITESPACE_P
-			| WITHIN
-			| WITHOUT
 			| WORK
 			| WRAPPER
 			| WRITE
 			| XML_P
-			| YEAR_P
 			| YES_P
 			| ZONE
 		;
 
+/* "Non label" keywords --- cannot be a bare column label in a SELECT list
+ * (you have to write AS in front).  Otherwise usable for anything.
+ */
+non_label_keyword:
+			DAY_P
+			| FILTER
+			| HOUR_P
+			| MINUTE_P
+			| MONTH_P
+			| OVER
+			| SECOND_P
+			| VARYING
+			| WITHIN
+			| WITHOUT
+			| YEAR_P
+		;
+
 /* Column identifier --- keywords that can be column, table, etc names.
  *
  * Many of these keywords will in fact be recognized as type or function
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/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index 37c23c9155..8148071127 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -447,6 +447,10 @@ pg_get_keywords(PG_FUNCTION_ARGS)
 				values[1] = "U";
 				values[2] = _("unreserved");
 				break;
+			case NON_LABEL_KEYWORD:
+				values[1] = "N";
+				values[2] = _("unreserved (cannot be used as an implicit alias)");
+				break;
 			case COL_NAME_KEYWORD:
 				values[1] = "C";
 				values[2] = _("unreserved (cannot be function or type name)");
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/common/keywords.h b/src/include/common/keywords.h
index 257c050903..835126c599 100644
--- a/src/include/common/keywords.h
+++ b/src/include/common/keywords.h
@@ -18,9 +18,10 @@
 
 /* Keyword categories --- should match lists in gram.y */
 #define UNRESERVED_KEYWORD		0
-#define COL_NAME_KEYWORD		1
-#define TYPE_FUNC_NAME_KEYWORD	2
-#define RESERVED_KEYWORD		3
+#define NON_LABEL_KEYWORD		1
+#define COL_NAME_KEYWORD		2
+#define TYPE_FUNC_NAME_KEYWORD	3
+#define RESERVED_KEYWORD		4
 
 #ifndef FRONTEND
 extern PGDLLIMPORT const ScanKeywordList ScanKeywords;
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 08f22ce211..b40aa34daf 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -25,453 +25,453 @@
  */
 
 /* 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)
+PG_KEYWORD("abort", ABORT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("absolute", ABSOLUTE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("access", ACCESS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("action", ACTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("add", ADD_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("admin", ADMIN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("after", AFTER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("aggregate", AGGREGATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("all", ALL, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("also", ALSO, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("alter", ALTER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("always", ALWAYS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("analyse", ANALYSE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)		/* British spelling */
+PG_KEYWORD("analyze", ANALYZE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("and", AND, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("any", ANY, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("array", ARRAY, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("as", AS, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("asc", ASC, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("assertion", ASSERTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("assignment", ASSIGNMENT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("asymmetric", ASYMMETRIC, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("at", AT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("attach", ATTACH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("attribute", ATTRIBUTE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("before", BEFORE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("begin", BEGIN_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("both", BOTH, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("by", BY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cache", CACHE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("call", CALL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("called", CALLED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cascade", CASCADE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cascaded", CASCADED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("case", CASE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cast", CAST, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("catalog", CATALOG_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("chain", CHAIN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("char", CHAR_P, COL_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("character", CHARACTER, COL_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("characteristics", CHARACTERISTICS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("check", CHECK, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("checkpoint", CHECKPOINT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("class", CLASS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("close", CLOSE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cluster", CLUSTER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("coalesce", COALESCE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("collate", COLLATE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("collation", COLLATION, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("column", COLUMN, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("columns", COLUMNS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("comment", COMMENT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("comments", COMMENTS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("commit", COMMIT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("committed", COMMITTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("concurrently", CONCURRENTLY, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("configuration", CONFIGURATION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("conflict", CONFLICT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("connection", CONNECTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("constraint", CONSTRAINT, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("constraints", CONSTRAINTS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("content", CONTENT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("continue", CONTINUE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("copy", COPY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cost", COST, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("create", CREATE, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cross", CROSS, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("csv", CSV, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cube", CUBE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current", CURRENT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_catalog", CURRENT_CATALOG, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_date", CURRENT_DATE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_role", CURRENT_ROLE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_schema", CURRENT_SCHEMA, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_time", CURRENT_TIME, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_timestamp", CURRENT_TIMESTAMP, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("current_user", CURRENT_USER, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cursor", CURSOR, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("cycle", CYCLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("data", DATA_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("database", DATABASE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("day", DAY_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("deallocate", DEALLOCATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("dec", DEC, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("decimal", DECIMAL_P, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("declare", DECLARE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("default", DEFAULT, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("defaults", DEFAULTS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("deferrable", DEFERRABLE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("deferred", DEFERRED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("definer", DEFINER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("delete", DELETE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("delimiter", DELIMITER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("delimiters", DELIMITERS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("depends", DEPENDS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("desc", DESC, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("detach", DETACH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("dictionary", DICTIONARY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("disable", DISABLE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("discard", DISCARD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("distinct", DISTINCT, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("do", DO, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("document", DOCUMENT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("domain", DOMAIN_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("double", DOUBLE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("drop", DROP, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("each", EACH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("else", ELSE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("enable", ENABLE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("encoding", ENCODING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("encrypted", ENCRYPTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("end", END_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("enum", ENUM_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("escape", ESCAPE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("event", EVENT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("except", EXCEPT, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("exclude", EXCLUDE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("excluding", EXCLUDING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("exclusive", EXCLUSIVE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("execute", EXECUTE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("exists", EXISTS, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("explain", EXPLAIN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("expression", EXPRESSION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("extension", EXTENSION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("external", EXTERNAL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("extract", EXTRACT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("false", FALSE_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("family", FAMILY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("fetch", FETCH, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("filter", FILTER, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("first", FIRST_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("float", FLOAT_P, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("following", FOLLOWING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("for", FOR, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("force", FORCE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("foreign", FOREIGN, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("forward", FORWARD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("freeze", FREEZE, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("from", FROM, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("full", FULL, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("function", FUNCTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("functions", FUNCTIONS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("generated", GENERATED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("global", GLOBAL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("grant", GRANT, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("groups", GROUPS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("having", HAVING, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("hour", HOUR_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("identity", IDENTITY_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("if", IF_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("ilike", ILIKE, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("immediate", IMMEDIATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("immutable", IMMUTABLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("implicit", IMPLICIT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("import", IMPORT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("insensitive", INSENSITIVE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("insert", INSERT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("instead", INSTEAD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("int", INT_P, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("into", INTO, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("invoker", INVOKER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("is", IS, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("label", LABEL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("lateral", LATERAL_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("leading", LEADING, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("leakproof", LEAKPROOF, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("least", LEAST, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("left", LEFT, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("level", LEVEL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("like", LIKE, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("limit", LIMIT, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("listen", LISTEN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("load", LOAD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("local", LOCAL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("localtimestamp", LOCALTIMESTAMP, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("location", LOCATION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("lock", LOCK_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("locked", LOCKED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("logged", LOGGED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("mapping", MAPPING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("match", MATCH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("materialized", MATERIALIZED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("method", METHOD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("minute", MINUTE_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("month", MONTH_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("names", NAMES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("national", NATIONAL, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nchar", NCHAR, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("new", NEW, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("next", NEXT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nfc", NFC, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nfd", NFD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nfkc", NFKC, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nfkd", NFKD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("no", NO, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("none", NONE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("normalize", NORMALIZE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("normalized", NORMALIZED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("not", NOT, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nothing", NOTHING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("notify", NOTIFY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("notnull", NOTNULL, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nowait", NOWAIT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("null", NULL_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nullif", NULLIF, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("nulls", NULLS_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("numeric", NUMERIC, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("object", OBJECT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("of", OF, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("off", OFF, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("offset", OFFSET, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("oids", OIDS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("old", OLD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("on", ON, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("only", ONLY, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("operator", OPERATOR, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("option", OPTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("options", OPTIONS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("or", OR, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("order", ORDER, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("ordinality", ORDINALITY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("others", OTHERS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("out", OUT_P, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("outer", OUTER_P, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("over", OVER, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("overlaps", OVERLAPS, TYPE_FUNC_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("overlay", OVERLAY, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("overriding", OVERRIDING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("owned", OWNED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("owner", OWNER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("plans", PLANS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("policy", POLICY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("position", POSITION, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("preceding", PRECEDING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("precision", PRECISION, COL_NAME_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("prepare", PREPARE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("prepared", PREPARED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("preserve", PRESERVE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("primary", PRIMARY, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("prior", PRIOR, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("privileges", PRIVILEGES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("procedural", PROCEDURAL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("procedure", PROCEDURE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("procedures", PROCEDURES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("program", PROGRAM, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("publication", PUBLICATION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("quote", QUOTE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("read", READ, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("real", REAL, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("ref", REF, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("referencing", REFERENCING, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("refresh", REFRESH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("reindex", REINDEX, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("relative", RELATIVE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("release", RELEASE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("rollup", ROLLUP, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("routine", ROUTINE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("routines", ROUTINES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("row", ROW, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("savepoint", SAVEPOINT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("schema", SCHEMA, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("schemas", SCHEMAS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("scroll", SCROLL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("search", SEARCH, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("second", SECOND_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("security", SECURITY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("select", SELECT, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("sequence", SEQUENCE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("sequences", SEQUENCES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("serializable", SERIALIZABLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("server", SERVER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("session", SESSION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("session_user", SESSION_USER, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("set", SET, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("setof", SETOF, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("sets", SETS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("share", SHARE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("show", SHOW, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("similar", SIMILAR, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("simple", SIMPLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("skip", SKIP, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("smallint", SMALLINT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("snapshot", SNAPSHOT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("some", SOME, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("sql", SQL_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("stable", STABLE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("standalone", STANDALONE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("start", START, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("statement", STATEMENT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("statistics", STATISTICS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("stdin", STDIN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("stdout", STDOUT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("stored", STORED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("strict", STRICT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("strip", STRIP_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("subscription", SUBSCRIPTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("substring", SUBSTRING, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("support", SUPPORT, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("symmetric", SYMMETRIC, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("sysid", SYSID, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("system", SYSTEM_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("table", TABLE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("tables", TABLES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("tablesample", TABLESAMPLE, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("tablespace", TABLESPACE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("temp", TEMP, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("template", TEMPLATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("temporary", TEMPORARY, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("text", TEXT_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("then", THEN, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("ties", TIES, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("time", TIME, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("timestamp", TIMESTAMP, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("to", TO, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("trailing", TRAILING, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("transaction", TRANSACTION, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("transform", TRANSFORM, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("treat", TREAT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("trigger", TRIGGER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("trim", TRIM, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("true", TRUE_P, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("truncate", TRUNCATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("trusted", TRUSTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("type", TYPE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("types", TYPES_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("uescape", UESCAPE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unbounded", UNBOUNDED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("uncommitted", UNCOMMITTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unencrypted", UNENCRYPTED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("union", UNION, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unique", UNIQUE, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unknown", UNKNOWN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unlisten", UNLISTEN, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("unlogged", UNLOGGED, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("until", UNTIL, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("update", UPDATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("user", USER, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("using", USING, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("vacuum", VACUUM, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("valid", VALID, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("validate", VALIDATE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("validator", VALIDATOR, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("value", VALUE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("values", VALUES, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("varchar", VARCHAR, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("variadic", VARIADIC, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("varying", VARYING, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("verbose", VERBOSE, TYPE_FUNC_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("version", VERSION_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("view", VIEW, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("views", VIEWS, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("volatile", VOLATILE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("when", WHEN, RESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("where", WHERE, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("whitespace", WHITESPACE_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("window", WINDOW, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("with", WITH, RESERVED_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("within", WITHIN, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("without", WITHOUT, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("work", WORK, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("wrapper", WRAPPER, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("write", WRITE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xml", XML_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlattributes", XMLATTRIBUTES, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlconcat", XMLCONCAT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlelement", XMLELEMENT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlexists", XMLEXISTS, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlforest", XMLFOREST, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlnamespaces", XMLNAMESPACES, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlparse", XMLPARSE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlpi", XMLPI, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlroot", XMLROOT, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmlserialize", XMLSERIALIZE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("xmltable", XMLTABLE, COL_NAME_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("year", YEAR_P, NON_LABEL_KEYWORD, EXPLICIT_COLUMN_LABEL)
+PG_KEYWORD("yes", YES_P, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
+PG_KEYWORD("zone", ZONE, UNRESERVED_KEYWORD, IMPLICIT_COLUMN_LABEL)
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"
diff --git a/src/test/regress/expected/create_operator.out b/src/test/regress/expected/create_operator.out
index 54e8b79159..ed77a6616e 100644
--- a/src/test/regress/expected/create_operator.out
+++ b/src/test/regress/expected/create_operator.out
@@ -22,10 +22,14 @@ CREATE OPERATOR #@# (
    leftarg = int8,		-- right unary
    procedure = numeric_fac
 );
+ERROR:  rightarg must be specified
+HINT:  postfix operator support has been discontinued
 CREATE OPERATOR #%# (
    leftarg = int8,		-- right unary
    procedure = numeric_fac
 );
+ERROR:  rightarg must be specified
+HINT:  postfix operator support has been discontinued
 -- Test operator created above
 SELECT point '(1,2)' <% widget '(0,0,3)' AS t,
        point '(1,2)' <% widget '(0,0,1)' AS f;
@@ -52,12 +56,12 @@ CREATE OPERATOR !=- (
    leftarg = int8,		-- right unary
    procedure = numeric_fac
 );
+ERROR:  rightarg must be specified
+HINT:  postfix operator support has been discontinued
 SELECT 2 !=-;
- ?column? 
-----------
-        2
-(1 row)
-
+ERROR:  syntax error at or near ";"
+LINE 1: SELECT 2 !=-;
+                    ^
 -- make sure lexer returns != as <> even in edge cases
 SELECT 2 !=/**/ 1, 2 !=/**/ 2;
  ?column? | ?column? 
@@ -172,11 +176,13 @@ CREATE OPERATOR #@%# (
    invalid_att = int8
 );
 WARNING:  operator attribute "invalid_att" not recognized
--- Should fail. At least leftarg or rightarg should be mandatorily specified
+ERROR:  rightarg must be specified
+HINT:  postfix operator support has been discontinued
+-- Should fail. At least rightarg should be mandatorily specified
 CREATE OPERATOR #@%# (
    procedure = numeric_fac
 );
-ERROR:  at least one of leftarg or rightarg must be specified
+ERROR:  at least rightarg must be specified
 -- Should fail. Procedure should be mandatorily specified
 CREATE OPERATOR #@%# (
    leftarg = int8
diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out
index 81a0c5d40f..8b2e29779d 100644
--- a/src/test/regress/expected/numeric.out
+++ b/src/test/regress/expected/numeric.out
@@ -2318,7 +2318,7 @@ ERROR:  value overflows numeric format
 --
 -- Tests for factorial
 --
-SELECT 4!;
+SELECT !!4;
  ?column? 
 ----------
        24
@@ -2336,19 +2336,38 @@ SELECT factorial(15);
  1307674368000
 (1 row)
 
-SELECT 100000!;
+SELECT !!100000;
 ERROR:  value overflows numeric format
-SELECT 0!;
+SELECT !!0;
  ?column? 
 ----------
         1
 (1 row)
 
-SELECT -4!;
+SELECT !!(-4);
 ERROR:  factorial of a negative number is undefined
 SELECT factorial(-4);
 ERROR:  factorial of a negative number is undefined
 --
+-- Postfix operator support has been removed.
+--
+SELECT -5!;
+ERROR:  syntax error at or near ";"
+LINE 1: SELECT -5!;
+                  ^
+SELECT -0!;
+ERROR:  syntax error at or near ";"
+LINE 1: SELECT -0!;
+                  ^
+SELECT 0!;
+ERROR:  syntax error at or near ";"
+LINE 1: SELECT 0!;
+                 ^
+SELECT 100!;
+ERROR:  syntax error at or near ";"
+LINE 1: SELECT 100!;
+                   ^
+--
 -- Tests for pg_lsn()
 --
 SELECT pg_lsn(23783416::numeric);
diff --git a/src/test/regress/sql/create_operator.sql b/src/test/regress/sql/create_operator.sql
index 8b6fd0bb43..eb2335e0ef 100644
--- a/src/test/regress/sql/create_operator.sql
+++ b/src/test/regress/sql/create_operator.sql
@@ -133,7 +133,7 @@ CREATE OPERATOR #@%# (
    invalid_att = int8
 );
 
--- Should fail. At least leftarg or rightarg should be mandatorily specified
+-- Should fail. At least rightarg should be mandatorily specified
 CREATE OPERATOR #@%# (
    procedure = numeric_fac
 );
diff --git a/src/test/regress/sql/numeric.sql b/src/test/regress/sql/numeric.sql
index 5dc80f686f..f8ce69422e 100644
--- a/src/test/regress/sql/numeric.sql
+++ b/src/test/regress/sql/numeric.sql
@@ -1115,14 +1115,22 @@ SELECT lcm(9999 * (10::numeric)^131068 + (10::numeric^131068 - 1), 2); -- overfl
 --
 -- Tests for factorial
 --
-SELECT 4!;
+SELECT !!4;
 SELECT !!3;
 SELECT factorial(15);
-SELECT 100000!;
-SELECT 0!;
-SELECT -4!;
+SELECT !!100000;
+SELECT !!0;
+SELECT !!(-4);
 SELECT factorial(-4);
 
+--
+-- Postfix operator support has been removed.
+--
+SELECT -5!;
+SELECT -0!;
+SELECT 0!;
+SELECT 100!;
+
 --
 -- Tests for pg_lsn()
 --
-- 
2.21.1 (Apple Git-122.3)

