Re: [HACKERS] Well, then you keep your darn columns - Mailing list pgsql-hackers

From Don Baccus
Subject Re: [HACKERS] Well, then you keep your darn columns
Date
Msg-id 3.0.1.32.20000124122948.01076800@mail.pacifier.com
Whole thread Raw
In response to Re: [HACKERS] Well, then you keep your darn columns  (Ed Loehr <eloehr@austin.rr.com>)
List pgsql-hackers
At 02:26 PM 1/24/00 -0600, Ed Loehr wrote:
>Don Baccus wrote:
>> 
>> >How would you handle multi-column indices that included the column
>> >being dropped?  E.g.,
>> >
>> >       create unique index foobar on mytable(foo,bar);
>> >
>> >where the 'bar' column is then dropped...
>> 
>> ...  Oracle drops all indices which reference the column.

>Seems like a new 'gotcha'... either way, informative warnings/notices
>would be nice.

I'm not saying that Oracle's "right", I just offer it as one datapoint.
I have access to an Oracle installation, so it's easy enough for me to
try things out.

If dropping the index were decided upon, a notice would be nice, yes.
Or, as Tom suggested, making the user drop relevant indices by hand
first as a safeguard.

>Along these same lines, how would pre-existing functions that
>referenced the just-dropped column be handled?  I'm thinking of
>PL/pgSQL...

I presume they'd fail just like any client software accessing those
columns via libpq queries, query files fed to psql, etc.  Dropping
a column is something you don't want to do blithely in an existing,
complex application, that's for sure!



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: [HACKERS] Well, then you keep your darn columns
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Well, then you keep your darn columns