postgresql/src/backend/catalog
Tom Lane f7f70d5e22 Create composite array types for initdb-created relations.
When we invented arrays of composite types (commit bc8036fc6),
we excluded system catalogs, basically just on the grounds of not
wanting to bloat pg_type.  However, it's definitely inconsistent that
catalogs' composite types can't be put into arrays when others can.
Another problem is that the exclusion is done by checking
IsUnderPostmaster in heap_create_with_catalog, which means that

(1) If a user tries to create a table in single-user mode, it doesn't
get an array type.  That's bad in itself, plus it breaks pg_upgrade.

(2) If someone drops and recreates a system view or information_schema
view (as we occasionally recommend doing), it will now have an array
type where it did not before, making for still more inconsistency.

So this is all pretty messy.  Let's just get rid of the inconsistency
and decree that system-created relations should have array types if
similar user-created ones would, i.e. it only depends on the relkind.
As of HEAD, that means that the initial contents of pg_type grow from
411 rows to 605, which is a lot of growth percentage-wise, but it's
still quite a small catalog compared to others.

Wenjing Zeng, reviewed by Shawn Wang, further hacking by me

Discussion: https://postgr.es/m/761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com
2020-07-06 14:21:16 -04:00
..
.gitignore Remove separate files for the initial contents of pg_(sh)description 2020-01-19 13:54:58 +02:00
aclchk.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
catalog.c Invent "trusted" extensions, and remove the pg_pltemplate catalog. 2020-01-29 18:42:43 -05:00
Catalog.pm Clarify coding in Catalog::AddDefaultValues. 2020-02-15 15:13:44 -05:00
dependency.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
genbki.pl Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
heap.c Create composite array types for initdb-created relations. 2020-07-06 14:21:16 -04:00
index.c Refactor ObjectAddress field assignments in more places 2020-07-01 17:03:50 +09:00
indexing.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
information_schema.sql Add current substring regular expression syntax 2020-06-29 11:05:00 +02:00
Makefile Split out CreateCast into src/backend/catalog/pg_cast.c 2020-03-10 11:28:23 -03:00
namespace.c Improve performance of "simple expressions" in PL/pgSQL. 2020-03-26 18:58:57 -04:00
objectaccess.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
objectaddress.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
partition.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_aggregate.c Refactor ObjectAddress field assignments in more places 2020-07-01 17:03:50 +09:00
pg_cast.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_collation.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
pg_constraint.c Refactor ObjectAddress field assignments in more places 2020-07-01 17:03:50 +09:00
pg_conversion.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
pg_db_role_setting.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_depend.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_enum.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_inherits.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_largeobject.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_namespace.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_operator.c Refactor ObjectAddress field assignments in more places 2020-07-01 17:03:50 +09:00
pg_proc.c Refactor ObjectAddress field assignments in more places 2020-07-01 17:03:50 +09:00
pg_publication.c Fix relcache reference leak 2020-04-11 09:44:14 +02:00
pg_range.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_shdepend.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_subscription.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
pg_type.c Refactor ObjectAddress field assignments for type dependencies 2020-06-29 09:56:52 +09:00
sql_feature_packages.txt Cleanup in SQL features files 2020-03-28 08:46:18 +01:00
sql_features.txt Support FETCH FIRST WITH TIES 2020-04-07 16:22:13 -04:00
storage.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
system_views.sql Replace superuser check by ACLs for replication origin functions 2020-06-14 12:40:37 +09:00
toasting.c Implement operator class parameters 2020-03-30 19:17:23 +03:00