Re: DROP COLUMN

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Rod Taylor <rbt(at)zort(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP COLUMN
Date: 2002-07-16 04:58:50
Message-ID: 200207160458.g6G4wo907978@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Definitely *not*; I don't want to kluge up every call to SearchSysCache
> >> with a feature that's only relevant to a small number of them.
>
> > Uh, then what?
>
> Then we make a wrapper function. Something like
>
> GetUndeletedColumnByName(relid,attname)
>
> replaces SearchSysCache(ATTNAME,...) in those places where you don't
> want to see deleted columns. It'd return NULL if it finds a column
> tuple but sees it's deleted.
>
> GetUndeletedColumnByNum(relid,attnum)
>
> replaces SearchSysCache(ATTNUM,...) similarly.

Good idea.

> > My only other idea is to make a syscache that is like ATTNAME except
> > that it doesn't return a dropped column.
>
> That would mean duplicate storage of tuples inside the catcache...

No, I was thinking of something that did the normal ATTNAME lookup in
the syscache code, then returned NULL on dropped columns; similar to
your idea but done inside the syscache code rather than in a separate
function.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-07-16 05:02:14 Re: DROP COLUMN
Previous Message Tom Lane 2002-07-16 04:56:14 Re: DROP COLUMN