Thread: pg_depend take 2

pg_depend take 2

From
Rod Taylor
Date:
Major changes since last revision:

initdb changes to account for table structure and new PIN elements for
genbki.sh.  Enables really easy pinning of data in a table you know the
ID of.

Most objects enforced RESTRICT / CASCADE options.

Still needs code to track foreign keys between tables (right now it
catches the triggers -- but not the relation.  See 'Foreign keys and
indexes' on hackers.

Serials sequences are dropped with the cascade.

'drop' regression test rewritten to test restrict / cascade of various
stuff.  It may be missing a few things, but implicit cascades are
defined elsewhere (indexes, triggers, etc.)

Thoughts:
Do system objects depend on users?  DROP USER ... CASCADE (drop all
tables, triggers, etc. that the user owns).

Will schemas auto-cascade to everything within them using the normal
DROP stuff or should all objects in a schema depend on the schema
implicitly?  Allows RESTRICT / CASCADE of a schema fairly quickly.
(Tom?)



Attachment