Re: ALTER DROP COLUMN - Mailing list pgsql-general

From Brent R. Matzelle
Subject Re: ALTER DROP COLUMN
Date
Msg-id 20010212203420.7910.qmail@web311.mail.yahoo.com
Whole thread Raw
In response to ALTER DROP COLUMN  ("ross::barna" <rbarna@neochi.com>)
Responses Re: ALTER DROP COLUMN
List pgsql-general
I know it's a pain, but it isn't all that bad.  Just rename your
table like so:

ALTER TABLE <old_name> RENAME TO <another_name>

Then re-create the old table without the deleted column(s):

SELECT col1, col2, col4 INTO TABLE <old_name> FROM
<another_name>

Then delete the old table:

DROP TABLE <another_name>

--- "ross::barna" <rbarna@neochi.com> wrote:
> neochi=> ALTER TABLE news DROP COLUMN date;
> ERROR:  ALTER TABLE/DROP COLUMN not yet implemented
>
>
> What's that about???  How do I drop a field of a table?!
>
> Thanks,
> -Ross
>


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

pgsql-general by date:

Previous
From: Trurl McByte
Date:
Subject: Versuin 1.1 of "pgsendmail" released.
Next
From: Dan B
Date:
Subject: Trigger using function written in PL/PGSQL returns "Unrecognized language specified"