On Mon, 12 Nov 2001, Brent Verner wrote:
> On 12 Nov 2001 at 18:28 (+0100), Peter Eisentraut wrote:
> | Brent Verner writes:
> |
> | > These patches fix the problem where an
> | >
> | > ALTER TABLE <table> RENAME <oldcolumn> TO <newcolumn>
> | >
> | > did not update the RI_ triggers if the oldcolumn was referenced in
> | > a RI constraint.
> |
> | Instead of trying to fix this, how about making the RI triggers not use
> | the column names in the first place. (Instead they should use the oid of
> | the table and the attnums.)
>
> I agree with you. Two things led me toward the current approach
> (modifying tgargs)
> 1) it would require fewer changes to get correct behavior, which
> was important as late in beta as I started and
> 2) I had /some/ idea of how to get it done ;-)
>
> I'll begin to look at what would be required to do it the right
> way for 7.3.
The biggest pain involved is deal with old dumps that have a create
constraint trigger with the names which would either mean we'd need
to support both for a version or have it massage the data on the
create constraint trigger if the function being specified is one of
the ri functions since I don't think its preferable to force one to
use the new dump to upgrade.