DROP CASCADE transitive dependencies

From: C GG <cgg0007(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: DROP CASCADE transitive dependencies
Date: 2018-12-03 18:13:00
Message-ID: CAJXW-z8VKSb_+do3aNotDKA85ekmK_cg8UmctGEsP6MT11Pw0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

...PostgreSQL 9.5...

`DROP SCHEMA blah;` reports all the dependent objects and advises to `DROP
SCHEMA blah CASCADE;` ...

Will DROP ... CASCADE traverse the entire dependency tree for each of the
dependent objects (potentially dropping something unintended), or will it
stop at the first level and balk at any new transitive dependencies?

All the dependent objects listed by `DROP SCHEMA blah` are fair game to be
dropped, but if I add CASCADE I don't necessarily want to have it go beyond
that initial list without my say-so.

The alternative is to drop each one in the list individually without
CASCADE-- a tedious task I'd rather short-cut, but in a non-reckless manner
;) ...

CG

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2018-12-03 18:15:49 Re: Query never completes with an OR condition
Previous Message Andrew Gierth 2018-12-03 18:09:14 Re: Query never completes with an OR condition