Completed pg_depend support - Mailing list pgsql-patches

From Rod Taylor
Subject Completed pg_depend support
Date
Msg-id 1018144688.59385.20.camel@knight.zort.ca
Whole thread Raw
List pgsql-patches
Tracks most inter system table dependencies.

With a small amount of work, allows dropping sequences with the table in
the event of a serial type.  Restricting (cascading) through foreign
keys, and functional RESTRICT / CASCADE behaviour to most items.

Doesn't allow DROP USER CASCADE, nor does it track comments.  A few
tables like opclass, and am/amop are not tracked either simply because I
really don't know what they do and how the user can affect them.


Rather large regression tests will be started with RESTRICT / CASCADE
behaviours after this portion is committed.  Tired of getting a large
number of conflicts every couple days with Toms namespace work.

New tricks?  Check out heap_drop_with_catalog.  You'll notice the
relation type, indicies, view rules are handled by dependDelete().

Also, try to drop type int4 ;)  Restricts by default (fresh initdb).

template1=# drop type int4;
ERROR:  Drop Restricted as Table pg_inherits Depends on Type int4

TODO.depend is the list of actions I needed to do (or did).  More or
gives a list of affected areas.


Dependencies still to do are in precompiled copies of functions,
defaults, and rule contents.  I have no clues how to do those items.


Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 7.2 fe-exec.c patch to PQescapeString()
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Completed pg_depend support