Andrzej Mazurkiewicz <andr...@mazurkiewicz.org> writes:
> My patch need one change that might be of significance.
> A type of the depencencies (pg_depend) among the FK constraint 
> (pg_constraint) 
> and the corresponding "RI_ConstraintTrigger" triggers has to be changed from 
> DEPENDENCY_INTERNAL to DEPENDENCY_AUTO.

So in other words, somebody could (accidentally or maliciously) break the
constraint by dropping one of its implementation triggers.  I doubt that's
acceptable.

> If this modification is not applied, the detail child table cannot be dropped 
> without prevous dropping the whole FK constraint because the removing 
> operation depend on the FK constraint of its parent table.

Dropping a child table is going to have much larger problems than that,
no?  What about the values in the child table --- don't you risk orphaning
referencing rows?  Or are you only supporting this on the referencing
side?

In any case, it seems like DROP TABLE could remove the dependency entries
for itself, rather than taking the risk of weakening the dependency type.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to