Petr Jelinek <p...@2ndquadrant.com> writes: > CREATE TABLE records dependency between relation and type, not between > column and type, but ALTER TABLE ADD COLUMN and ALTER TABLE ALTER COLUMN > TYPE record dependencies between relation column and type and not > between relation and type
Really? I get regression=# CREATE TYPE droppabletype1 AS (a integer, b text); CREATE TYPE regression=# CREATE TABLE testtable (droppablecol1 droppabletype1, undroppablecol1 int); CREATE TABLE regression=# CREATE TYPE droppabletype2 AS (a integer, b text); CREATE TYPE regression=# alter table testtable add column f3 droppabletype2; ALTER TABLE regression=# select pg_describe_object(classid,objid,objsubid) as obj, pg_describe_object(refclassid,refobjid,refobjsubid) as ref, deptype from pg_depend where refobjid = 'droppabletype1'::regtype; obj | ref | deptype --------------------------------------+---------------------+--------- composite type droppabletype1 | type droppabletype1 | i type droppabletype1[] | type droppabletype1 | i table testtable column droppablecol1 | type droppabletype1 | n (3 rows) regression=# select pg_describe_object(classid,objid,objsubid) as obj, pg_describe_object(refclassid,refobjid,refobjsubid) as ref, deptype from pg_depend where refobjid = 'droppabletype2'::regtype; obj | ref | deptype -------------------------------+---------------------+--------- composite type droppabletype2 | type droppabletype2 | i type droppabletype2[] | type droppabletype2 | i table testtable column f3 | type droppabletype2 | n (3 rows) The dependencies look just the same to me ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers