Re: DROP TABLE CASCADE doesn't drop dependencies

From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: DROP TABLE CASCADE doesn't drop dependencies
Date: 2019-02-04 00:28:20
Message-ID: CAEP4nAzG2fnpOZHkgPrc8+qk4YmPjBxyysZE8NhoF=dyxFoiiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks Tom for clarifying promptly (and effectively helping me out), since
that pointed me to find v9.6.6 related bug-fix around this, that is
currently affecting an upgrade.

The v12 DROP does seem like an unrelated issue though, which I happened to
notice coincidentally.
-
robins

On Mon, 4 Feb 2019 at 10:42, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Robins Tharakan <tharakan(at)gmail(dot)com> writes:
> > Is it expected for DROP TABLE CASCADE to find a related table but not
> drop
> > it?
> > The case in point, is when the base table is used as a column type.
> > This can at least be reproduced in v9.6 and v10, where it silently drops
> > the column!
>
> Dropping the column is exactly what is supposed to happen: the scope
> of the dependency is defined to be just the column of that type, not
> the table containing it.
>
> Not sure if this is documented anyplace in the SGML docs, but I'm
> pretty sure we have regression test cases for it.
>
> regards, tom lane
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-02-04 01:03:42 Re: DROP TABLE CASCADE doesn't drop dependencies
Previous Message Tom Lane 2019-02-03 23:42:20 Re: DROP TABLE CASCADE doesn't drop dependencies