Re: DROP VIEW name WITHOUT TYPE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: DROP VIEW name WITHOUT TYPE
Date
Msg-id 3630633.1731077901@sss.pgh.pa.us
Whole thread Raw
In response to DROP VIEW name WITHOUT TYPE  (Przemysław Sztoch <przemyslaw@sztoch.pl>)
List pgsql-hackers
=?UTF-8?Q?Przemys=C5=82aw_Sztoch?= <przemyslaw@sztoch.pl> writes:
> Am I right, If we leave (or convert) TYPE linked to VIEW, then DROP will be possible?

No ...

CREATE VIEW level1 AS SELECT * FROM base_table;
CREATE VIEW level2 AS SELECT * FROM level1;

You can't drop level1 without dropping level2; the composite type
associated with level1 doesn't enter into that.  I'd actually
find it rather surprising if there are many real-world cases where
other objects have a dependency on a view's composite type but not
on the view itself.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4
Next
From: Tom Lane
Date:
Subject: Re: Fix small typo, use InvalidRelFileNumber instead of InvalidOid