Re: drop column? - Mailing list pgsql-admin

From lonh SENG
Subject Re: drop column?
Date
Msg-id 009901c1a47a$7f88ed50$05a00017@idlonh
Whole thread Raw
In response to drop column?  (Jodi Kanter <jkanter@virginia.edu>)
List pgsql-admin
Jodi,

Of course, we should have 'alter table .... drop column ....' statement.
>Can I remove this column or will I need to drop the entire table and
restore from backup?
You can do as following:
select fields_you_want_to_keep into new_table from old_table.
Make sure that this statement execute successfully. Then drop the old table
and change table name (alter table ... rename to ...).
I am a newbie of postgres.

lonh
----- Original Message -----
From: Jodi Kanter
To: Postgres Admin List
Sent: Thursday, January 24, 2002 2:54 AM
Subject: [ADMIN] drop column?


I cannot seem to locate any documentation about removing a column that I
just added to a table. There is no data in that particular column but there
is in the rest of the table.
Can I remove this column or will I need to drop the entire table and restore
from backup?
Thanks
Jodi
_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu







pgsql-admin by date:

Previous
From: "Zhang, Anna"
Date:
Subject: timing a process
Next
From: "Jean Huveneers"
Date:
Subject: Maximum Performance