Received: from mailmx.camgsm.com.kh ([203.144.65.11]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0O2Nll07172 for ; Wed, 23 Jan 2002 21:23:53 -0500 (EST) (envelope-from slonh@camgsm.com.kh) Received: from idlonh ([23.0.160.5]) by mailmx.camgsm.com.kh (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) with SMTP id g0O1wiT02581; Thu, 24 Jan 2002 08:58:44 +0700 X-Authentication-Warning: mailmx.camgsm.com.kh: Host [23.0.160.5] claimed to be idlonh Message-ID: <009901c1a47a$7f88ed50$05a00017@idlonh> From: "lonh SENG" To: "Jodi Kanter" , "Postgres Admin List" References: <008401c1a447$cd0402f0$de138f80@virginia.edu> Subject: Re: drop column? Date: Thu, 24 Jan 2002 08:57:37 +0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200201/155 X-Sequence-Number: 3042 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