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

From: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
To: "'Ed Loehr '" <eloehr(at)austin(dot)rr(dot)com>, "'Tom Lane '" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Hiroshi Inoue '" <Inoue(at)tpf(dot)co(dot)jp>, "'Peter Eisentraut '" <peter_e(at)gmx(dot)net>, "'pgsql-hackers(at)postgreSQL(dot)org '" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Well, then you keep your darn columns
Date: 2000-01-24 21:39:27
Message-ID: 1BF7C7482189D211B03F00805F8527F748C488@S-NATH-EXCH2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All the databases that I've worked on (that actually have the ability to
drop columns) generate an error if the column to be dropped is part of a
key, and I think that is sound behaviour.

MikeA

-----Original Message-----
From: Ed Loehr
To: Tom Lane
Cc: Hiroshi Inoue; Peter Eisentraut; pgsql-hackers(at)postgreSQL(dot)org
Sent: 00/01/24 08:13
Subject: Re: [HACKERS] Well, then you keep your darn columns

Tom Lane wrote:

> Let's see: DROP COLUMN would have to mark the column invisible, remove
> any associated constraints (particularly NOT NULL) and indexes, and
> it'd be done. The parser would then have to ignore the column when
> doing column name lookups or expansion of '*', and it would have to
> insert a NULL value for the column when transforming INSERT or UPDATE.
> And that'd be just about it. I like it.

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...

Dropping all of that index would seem to be problematic.

Cheers,
Ed Loehr

************

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-01-24 21:52:07 Re: [HACKERS] Well, then you keep your darn columns
Previous Message Bruce Momjian 2000-01-24 20:37:02 Re: [HACKERS] Well, then you keep your darn columns