Re: Error with DROP column

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: mohan(at)physics(dot)gmu(dot)edu
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Error with DROP column
Date: 2003-10-27 19:48:54
Message-ID: 3F9D76A6.9090506@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dnia 2003-10-27 20:35, Użytkownik mohan(at)physics(dot)gmu(dot)edu napisał:
> Hi All i am trying to DROP the column but i keep getting this error.
>
> ALTER TABLE institution DROP COLUMN name CASCADE;
> ERROR: ALTER TABLE / DROP COLUMN is not implemented
>
> please help me in solving this issue.

Looks like Postgresql older than 7.x (7.3?)

You can't drop column this way. In older versions you can do this only by:
create table temp (columns as you wish to have)
insert into temp select * from old_table
drop old_table
alter table temp rename to old_table

Regards,
Tomasz Myrta

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Devrim GUNDUZ 2003-10-27 19:49:41 Re: Error with DROP column
Previous Message Josh Berkus 2003-10-27 19:35:58 Re: extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax