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)
commitbc8036fc666a8f846b1d4b2f935af7edd90eb5aa
tree7915d1a5cce3d9b5acdff19d8f12382ad5299485
parentb1110aaa8bc7da6f7ebdc12fb550ed378b72ef6e
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