postgresql/src/include/catalog
Tom Lane 06a7c3154f Allow most keywords to be used as column labels without requiring AS.
Up to now, if you tried to omit "AS" before a column label in a SELECT
list, it would only work if the column label was an IDENT, that is not
any known keyword.  This is rather unfriendly considering that we have
so many keywords and are constantly growing more.  In the wake of commit
1ed6b8956 it's possible to improve matters quite a bit.

We'd originally tried to make this work by having some of the existing
keyword categories be allowed without AS, but that didn't work too well,
because each category contains a few special cases that don't work
without AS.  Instead, invent an entirely orthogonal keyword property
"can be bare column label", and mark all keywords that way for which
we don't get shift/reduce errors by doing so.

It turns out that of our 450 current keywords, all but 39 can be made
bare column labels, improving the situation by over 90%.  This number
might move around a little depending on future grammar work, but it's
a pretty nice improvement.

Mark Dilger, based on work by myself and Robert Haas;
review by John Naylor

Discussion: https://postgr.es/m/38ca86db-42ab-9b48-2902-337a0d6b8311@2ndquadrant.com
2020-09-18 16:46:36 -04:00
..
.gitignore Replace our traditional initial-catalog-data format with a better design. 2018-04-08 13:17:27 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
binary_upgrade.h Don't create pg_type entries for sequences or toast tables. 2020-07-07 15:43:22 -04:00
catalog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
catversion.h Allow most keywords to be used as column labels without requiring AS. 2020-09-18 16:46:36 -04:00
dependency.h Heed lock protocol in DROP OWNED BY 2020-05-06 12:29:41 -04:00
duplicate_oids Update copyrights for 2020 2020-01-01 12:21:45 -05:00
genbki.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
heap.h Use multi-inserts for pg_attribute and pg_shdepend 2020-07-31 10:54:26 +09:00
index.h Fix possible crash during FATAL exit from reindexing. 2020-04-21 15:58:42 -04:00
indexing.h Use multi-inserts for pg_depend 2020-09-05 13:52:47 +09:00
namespace.h Improve performance of "simple expressions" in PL/pgSQL. 2020-03-26 18:58:57 -04:00
objectaccess.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
objectaddress.h Eliminate cache lookup errors in SQL functions for object addresses 2020-07-15 09:03:10 +09:00
partition.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_aggregate.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_aggregate.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_am.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_am.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_amop.dat Do pre-release housekeeping on catalog data. 2020-05-12 13:03:43 -04:00
pg_amop.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_amproc.dat Add support for building GiST index by sorting. 2020-09-17 11:33:40 +03:00
pg_amproc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_attrdef.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_attribute.h Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
pg_auth_members.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_authid.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_authid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_cast.dat Add SQL type xid8 to expose FullTransactionId to users. 2020-04-07 12:03:59 +12:00
pg_cast.h Split out CreateCast into src/backend/catalog/pg_cast.c 2020-03-10 11:28:23 -03:00
pg_class.dat Don't require pg_class.dat to contain correct relnatts values. 2020-02-15 14:57:27 -05:00
pg_class.h Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
pg_collation.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_collation.h Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
pg_constraint.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_control.h Rename VariableCacheData.nextFullXid to nextXid. 2020-08-11 12:07:14 -07:00
pg_conversion.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_conversion.h Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
pg_database.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_database.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_db_role_setting.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_default_acl.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_depend.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_description.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_enum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_event_trigger.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_extension.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_foreign_data_wrapper.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_foreign_server.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_foreign_table.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_index.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
pg_inherits.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_init_privs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_language.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_language.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_largeobject.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_largeobject_metadata.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_namespace.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_namespace.h Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
pg_opclass.dat Add SQL type xid8 to expose FullTransactionId to users. 2020-04-07 12:03:59 +12:00
pg_opclass.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_operator.dat Remove factorial operators, leaving only the factorial() function. 2020-09-17 16:17:27 -04:00
pg_operator.h Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
pg_opfamily.dat Do pre-release housekeeping on catalog data. 2020-05-12 13:03:43 -04:00
pg_opfamily.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_partitioned_table.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
pg_policy.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_proc.dat Allow most keywords to be used as column labels without requiring AS. 2020-09-18 16:46:36 -04:00
pg_proc.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
pg_publication.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_publication_rel.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_range.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_range.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_replication_origin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_rewrite.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_seclabel.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_sequence.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_shdepend.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_shdescription.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_shseclabel.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_statistic.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_statistic_ext.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
pg_statistic_ext_data.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_subscription.h Add support for streaming to built-in logical replication. 2020-09-03 07:54:07 +05:30
pg_subscription_rel.h Correctly mark pg_subscription_rel.srsublsn as nullable. 2020-07-20 14:55:56 -04:00
pg_tablespace.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_tablespace.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_transform.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_trigger.h Be more careful about marking catalog columns NOT NULL by default. 2020-07-21 13:03:48 -04:00
pg_ts_config.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_config.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_config_map.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_config_map.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_dict.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_dict.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_parser.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_parser.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_template.dat Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ts_template.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_type.dat Create composite array types for initdb-created relations. 2020-07-06 14:21:16 -04:00
pg_type.h Introduce "anycompatible" family of polymorphic types. 2020-03-19 11:43:11 -04:00
pg_user_mapping.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reformat_dat_file.pl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
renumber_oids.pl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
storage.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
storage_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
toasting.h Invent "trusted" extensions, and remove the pg_pltemplate catalog. 2020-01-29 18:42:43 -05:00
unused_oids Update copyrights for 2020 2020-01-01 12:21:45 -05:00