Re: DROP COLUMN - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: DROP COLUMN
Date
Msg-id 1026750226.69612.54.camel@jester
Whole thread Raw
In response to DROP COLUMN  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: DROP COLUMN  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Mon, 2002-07-15 at 11:30, Christopher Kings-Lynne wrote:
> OK, more DROP COLUMN funny business:
> 
> Assuming that selects, updates and deletes all ignore the dropped column,
> what happens with things like alter table statements?
> 
> You can still quite happily set the default for a dropped column, etc.
> 
> Will I have to add a dropped column check in everywhere that a command is
> able to target a column.  ie. create index, cluster, alter table, etc,
> etc.?  Or is there an easier way?

Each utility statement does some kind of a SearchSysCache() to determine
the status of the column (whether it exists or not).

You may want to write a wrapper function in lsyscache.c that returns the
status of the column (dropped or not).  Perhaps the att tuple could be
fetched through this function (processed on the way out) -- though
lsyscache routines tend to return simple items.



pgsql-hackers by date:

Previous
From: Marc Lavergne
Date:
Subject: COPY x FROM STDIN escape handlers
Next
From: Tom Lane
Date:
Subject: Re: COPY x FROM STDIN escape handlers