Re: [HACKERS] Happy column dropping - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Happy column dropping
Date
Msg-id 27260.948758416@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Happy column dropping  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Perhaps their should be a pg_attribute.attisusedbytrigger::oid,
> pg_attribute.attisconstrainedbyconstr::oid, etc. Eventually, I think, this
> is unavoidable if you want DROP TABLE to do the right thing as well, and
> scanning and decoding possibly hundreds of rules, triggers, and
> constraints won't get you far.

Wouldn't help much: when you do a DROP TRIGGER, do you turn off the
attisusedbytrigger, or not?  You'd still end up scanning everything,
just at a different time.

Maybe if it were a reference count, and not just a bit --- but I'd sure
hate to try to guarantee that we maintain the reference count
accurately.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: [HACKERS] Happy column dropping
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Happy column dropping