From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: DROP VIEW name WITHOUT TYPE |
Date: | 2024-11-08 14:58:21 |
Message-ID: | 3630633.1731077901@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
=?UTF-8?Q?Przemys=C5=82aw_Sztoch?= <przemyslaw(at)sztoch(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-11-08 15:06:44 | Re: Fix small typo, use InvalidRelFileNumber instead of InvalidOid |
Previous Message | Ashutosh Bapat | 2024-11-08 14:57:30 | Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4 |