Re: [HACKERS] Well, then you keep your darn columns

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Well, then you keep your darn columns
Date: 2000-01-24 20:29:48
Message-ID: 3.0.1.32.20000124122948.01076800@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-01-24 20:37:02 Re: [HACKERS] Well, then you keep your darn columns
Previous Message Ed Loehr 2000-01-24 20:26:40 Re: [HACKERS] Well, then you keep your darn columns