Re: drop column? - Mailing list pgsql-general

From Jason C. Wells
Subject Re: drop column?
Date
Msg-id Pine.SOL.3.96.1001004084525.22073A-100000@utah
Whole thread Raw
In response to drop column?  (Andrew Gould <andrewgould@yahoo.com>)
List pgsql-general
On Wed, 4 Oct 2000, Andrew Gould wrote:

> How do you drop a column from a table?  I'm using
> PostgreSQL 7.0.2.

From the FAQ.

4.5) How do you remove a column from a table?

   We do not support ALTER TABLE DROP COLUMN, but do this:
        SELECT ...  -- select all columns but the one you want to remove
        INTO TABLE new_table
        FROM old_table;
        DROP TABLE old_table;
        ALTER TABLE new_table RENAME TO old_table;

Thank you,
Jason C. Wells


pgsql-general by date:

Previous
From: "Adam Lang"
Date:
Subject: Re: drop column?
Next
From: "Poul L. Christiansen"
Date:
Subject: Re: drop column?