Re: delete columns from table!

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: Fariba Noorbakhsh <fNoorbakhsh(at)tecways(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: delete columns from table!
Date: 2001-08-13 14:36:35
Message-ID: 20010813153635.H5732@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 06, 2001 at 05:42:09PM +0200, Fariba Noorbakhsh wrote:
> Hi Patrick,
>
> Do you know how I can drop(delete) a column from a table?! Just a column. I don't
> think you can do it with Alter table
>
> Thanks in advance,
> Fariba

According to the TODO list:

COMMANDS
...
* ALTER
...
o Add ALTER TABLE DROP COLUMN feature [drop]

so the way forward may be to
pg_dump -t your_table -D your_database > table.txt
and have fun editing out all reference to said column from table.txt. Then
drop the table and reload from table.txt. YMMV..

Cheers,

Patrick

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Trambakoulos 2001-08-13 14:42:03 Calling stored procedures.
Previous Message Bernie Holmes 2001-08-13 14:35:52 Re: How can I view the definition of an existing trigger?