Re: ALTER TABLE RENAME fix

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Brent Verner <brent(at)rcfile(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ALTER TABLE RENAME fix
Date: 2001-11-12 23:48:03
Message-ID: 3BF05FB3.91C9EE84@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian 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.
>
> Added to TODO:
>
> * Make triggers refer to columns by oid, not name

What OIDs could we use to point columns ?

Is it really a good idea to use IDs or numbers in the first place ?
We know now reference by IDs aren't necessarily good, don't we ?
It's not preferable to optimize only *rename*. IMHO this should be
considered as a part of total object-dependency mechanism.

regards,
Hiroshi Inoue

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-11-12 23:52:42 Re: Patch to add Heimdal kerberos support
Previous Message Tom Lane 2001-11-12 23:41:17 Possible patch to remove "triggered data change" support