pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: mohan@physics.gmu.edu
Cc: pgsql-sql@postgresql.org
Subject: Re: Error with DROP column
Date: Mon, 27 Oct 2003 20:48:54 +0100
Message-ID: <3F9D76A6.9090506@klaster.net> (raw)
In-Reply-To: <62967.138.88.163.115.1067283344.squirrel@physics.gmu.edu>
References: <62967.138.88.163.115.1067283344.squirrel@physics.gmu.edu>

Dnia 2003-10-27 20:35, Użytkownik mohan@physics.gmu.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




view thread (3+ messages)  latest in thread

Message-ID: <3F9D76A6.9090506@klaster.net>
Permalink:  ../3F9D76A6.9090506@klaster.net/
Also on:    postgresql.org/message-id/3F9D76A6.9090506@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, mohan@physics.gmu.edu
  Subject: Re: Error with DROP column
  In-Reply-To: <3F9D76A6.9090506@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox