Re: Column/type dependency recording inconsistencies
| От | Tom Lane |
|---|---|
| Тема | Re: Column/type dependency recording inconsistencies |
| Дата | |
| Msg-id | 11989.1415568202@sss.pgh.pa.us обсуждение |
| Ответ на | Column/type dependency recording inconsistencies (Petr Jelinek <petr@2ndquadrant.com>) |
| Ответы |
Re: Column/type dependency recording inconsistencies
|
| Список | pgsql-hackers |
Petr Jelinek <petr@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| itype droppabletype1[] | type droppabletype1 | itable testtable column droppablecol1 |
typedroppabletype1 | 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 |
itypedroppabletype2[] | type droppabletype2 | itable testtable column f3 | type droppabletype2 | n
(3 rows)
The dependencies look just the same to me ...
regards, tom lane
В списке pgsql-hackers по дате отправления: