Support arrays of composite types, including the rowtypes of regular tables
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2007 17:57:14 +0000 (17:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 11 May 2007 17:57:14 +0000 (17:57 +0000)
commite60a0aa4e5d43344897304a4dc47c245fd4d75e5
tree67755624c9ffaa80478b6ffcceb190a9be981508
parent4e2fbf4a19f4eb4522fdb041d7e393f5c07b3ecc
Support arrays of composite types, including the rowtypes of regular tables
and views (but not system catalogs, nor sequences or toast tables).  Get rid
of the hardwired convention that a type's array type is named exactly "_type",
instead using a new column pg_type.typarray to provide the linkage.  (It still
will be named "_type", though, except in odd corner cases such as
maximum-length type names.)

Along the way, make tracking of owner and schema dependencies for types more
uniform: a type directly created by the user has these dependencies, while a
table rowtype or auto-generated array type does not have them, but depends on
its parent object instead.

David Fetter, Andrew Dunstan, Tom Lane
25 files changed:
doc/src/sgml/array.sgml
doc/src/sgml/catalogs.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/syntax.sgml
src/backend/catalog/README
src/backend/catalog/heap.c
src/backend/catalog/pg_shdepend.c
src/backend/catalog/pg_type.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/parser/parse_type.c
src/backend/utils/cache/lsyscache.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/include/catalog/catversion.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_class.h
src/include/catalog/pg_type.h
src/include/commands/typecmds.h
src/test/regress/expected/alter_table.out
src/test/regress/expected/oidjoins.out
src/test/regress/expected/type_sanity.out
src/test/regress/sql/oidjoins.sql
src/test/regress/sql/type_sanity.sql
src/tools/findoidjoins/README