Re: ALTER TABLE RENAME fix

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Brent Verner <brent(at)rcfile(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ALTER TABLE RENAME fix
Date: 2001-11-12 20:26:21
Message-ID: 200111122026.fACKQLt22708@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> 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

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Stephan Szabo 2001-11-12 21:07:39 Re: ALTER TABLE RENAME fix
Previous Message Brent Verner 2001-11-12 19:38:55 Re: ALTER TABLE RENAME fix