pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error with DROP column
3+ messages / 3 participants
[nested] [flat]

* Error with DROP column
@ 2003-10-27 19:35  mohan@physics.gmu.edu
  0 siblings, 2 replies; 3+ messages in thread

From: mohan@physics.gmu.edu @ 2003-10-27 19:35 UTC (permalink / raw)
  To: pgsql-sql

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.









^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error with DROP column
@ 2003-10-27 19:48  Tomasz Myrta <jasiek@klaster.net>
  parent: mohan@physics.gmu.edu
  1 sibling, 0 replies; 3+ messages in thread

From: Tomasz Myrta @ 2003-10-27 19:48 UTC (permalink / raw)
  To: mohan@physics.gmu.edu; +Cc: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error with DROP column
@ 2003-10-27 19:49  Devrim GUNDUZ <devrim@gunduz.org>
  parent: mohan@physics.gmu.edu
  1 sibling, 0 replies; 3+ messages in thread

From: Devrim GUNDUZ @ 2003-10-27 19:49 UTC (permalink / raw)
  To: pgsql-sql; +Cc: pgsql-sql

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

On Mon, 27 Oct 2003 mohan@physics.gmu.edu wrote:

> 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

I think you are using an old version of PostgreSQL. AFAIR this 
functionality was implemented on 7.3. Here is mine:

*******************************************
postgres@[local]:test=# SELECT version();
                                                 version
- ---------------------------------------------------------------------------------------------------------
 PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 
20030222 (Red Hat Linux 3.2.2-5)
(1 row)

postgres@[local]:test=# ALTER TABLE institution drop column name;
ALTER TABLE

*******************************************

Maybe you should upgrade your PostgreSQL.

Regards,
- -- 
Devrim GUNDUZ
devrim@gunduz.org				devrim.gunduz@linux.org.tr 
			http://www.tdmsoft.com
			http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/nXbYtl86P3SPfQ4RAqScAKDsSSSG7KYiM/TnBRguaG5hRF6MIACgwbfu
ZdGWzsBbtu486c0BreFFlmA=
=hFr5
-----END PGP SIGNATURE-----




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-10-27 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 19:35 Error with DROP column mohan@physics.gmu.edu
2003-10-27 19:48 ` Tomasz Myrta <jasiek@klaster.net>
2003-10-27 19:49 ` Devrim GUNDUZ <devrim@gunduz.org>

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