Re: [HACKERS] ALTER TABLE DROP COLUMN

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Hannu Krosing <hannu(at)tm(dot)ee>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] ALTER TABLE DROP COLUMN
Date: 2000-02-27 18:17:52
Message-ID: 3.0.1.32.20000227101752.00fae940@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 08:06 PM 2/27/00 +0200, Hannu Krosing wrote:

>Does SQL92 syntax allow dropping several columns, i.e.
>
>ALTER TABLE mytable DROP COLUMN col1,col5,col6;

My reading of the syntax says no, it is not allowed.

>If it does, it would be very desirable to implement it to avoid the need
>for vacuum between each DROP in order to have _only_ 2X disk usage.

However, implementing useful extensions to the standard in an
upward-compatible way doesn't bother me.

I'm not fond of language implementations that are full of gratuitous
extensions, but when extensions address real shortcomings in a standard
or intersect with a particular implementation in a useful way, then
it makes sense to add them. In this case, you're asking for an
extension that's useful because Postgres doesn't reclaim storage when
a tuple's deleted, but only when the table's vacuumed. Seems fair
enough.

Whether or not it would be hard to implement is another matter...

- 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 Tom Lane 2000-02-27 18:58:31 Re: [HACKERS] type coerce problem with lztext
Previous Message Hannu Krosing 2000-02-27 18:06:59 Re: [HACKERS] ALTER TABLE DROP COLUMN