Only allow typed tables to hang off composite types, not e.g. tables.
authorRobert Haas <rhaas@postgresql.org>
Mon, 18 Apr 2011 14:13:34 +0000 (10:13 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 18 Apr 2011 14:19:46 +0000 (10:19 -0400)
commit04db0fdbfa9382730bb65f94bca2cd8063a3456a
treefa66be340f38b1cd5507732828e59aef0744a293
parentb7b86924c6da46c774e1ab5d524a6bc4f72627ab
Only allow typed tables to hang off composite types, not e.g. tables.

This also ensures that we take a relation lock on the composite type when
creating a typed table, which is necessary to prevent the composite type
and the typed table from getting out of step in the face of concurrent
DDL.

Noah Misch, with some changes.
src/backend/parser/parse_utilcmd.c
src/test/regress/expected/typed_table.out
src/test/regress/sql/typed_table.sql