Re: DROP COLUMN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: DROP COLUMN
Date
Msg-id 29989.1026795374@sss.pgh.pa.us
Whole thread Raw
In response to Re: DROP COLUMN  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: DROP COLUMN  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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.

> 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...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: DROP COLUMN
Next
From: Bruce Momjian
Date:
Subject: Re: DROP COLUMN