From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robins Tharakan <tharakan@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: DROP TABLE CASCADE doesn't drop dependencies
Date: Sun, 03 Feb 2019 18:42:20 -0500
Message-ID: <25327.1549237340@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEP4nAzV3RGu7hgh7dXC44UsnDeFYEt4yZU_dnzmShNn33FGDQ@mail.gmail.com>
References: <CAEP4nAzV3RGu7hgh7dXC44UsnDeFYEt4yZU_dnzmShNn33FGDQ@mail.gmail.com>
Robins Tharakan <tharakan@gmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, tharakan@gmail.com
Subject: Re: DROP TABLE CASCADE doesn't drop dependencies
In-Reply-To: <25327.1549237340@sss.pgh.pa.us>
References: <CAEP4nAzV3RGu7hgh7dXC44UsnDeFYEt4yZU_dnzmShNn33FGDQ@mail.gmail.com> <25327.1549237340@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox