Re: DROP COLUMN

From: Rod Taylor <rbt(at)zort(dot)ca>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP COLUMN
Date: 2002-07-15 16:23:45
Message-ID: 1026750226.69612.54.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

  • DROP COLUMN at 2002-07-15 15:30:05 from Christopher Kings-Lynne

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-15 17:05:40 Re: COPY x FROM STDIN escape handlers
Previous Message Marc Lavergne 2002-07-15 16:18:17 COPY x FROM STDIN escape handlers