Re: Bug on drop extension dependencies ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug on drop extension dependencies ?
Date
Msg-id 138820.1752347262@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug on drop extension dependencies ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Bug on drop extension dependencies ?
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sat, Jul 12, 2025 at 11:31 AM Marcos Pegoraro <marcos@f10.com.br> wrote:
>> I don't know how to fix it, but I think it's a bug.

> You told it to cascade and it will happily remove anything within the
> database to comply.  It is not a bug.  The docs even make that point
> explicitly:

Indeed.  If we put a restriction on this case then we'd just need to
invent a "REALLY CASCADE" option that did the more aggressive thing.

In any case, AFAICS the SQL spec says what CASCADE means, and this
is what it means.  There's no intermediate step between RESTRICT
(don't drop any dependent objects) and CASCADE (drop every directly
or indirectly dependent object).

I grant that there could sometimes be a use for intermediate levels of
aggressiveness, but it's hard to see exactly where to draw the line
that wouldn't be extremely application-specific.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Bug on drop extension dependencies ?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Adding support for SSLKEYLOGFILE in the frontend