Ynt: where's ALTER TABLE table DROP [ COLUMN ] column???

From: "Madness" <devrim(at)oper(dot)metu(dot)edu(dot)tr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Ynt: where's ALTER TABLE table DROP [ COLUMN ] column???
Date: 2001-05-26 07:49:05
Message-ID: 9enmsl$266o$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I want to make a little correction. The correct syntax should be:

SELECT [all columns except named] into mytemp1 from [$table_name] ;
drop table [$table_name];
SELECT * into [$table_name] from mytemp1;

With regards,
Devrim GNDZ

Keith Gray <keith(at)heart(dot)com(dot)au> wrote in message
news:3B0DFBF9(dot)CEBDC3CC(at)heart(dot)com(dot)au(dot)(dot)(dot)
> Bruno Boettcher wrote:
> >
> > Hello!
> >
> > as far as i can tell, i can add columns to a table, but can't remove
> > them later on.....
> >
> > is this true?
>
> My thought would be that somebody must have written an
> automated version of
>
> select [all columns except named] from [named table] into droptemp;
> drop [named table];
> select * from droptemp into [named table];
>
> Would this be available or easily written as a "rule" ??
> Could anyone familiar with the code comment?
>
> --
> Keith Gray
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Madness 2001-05-26 10:22:49 Ynt: corrupted tables !!!
Previous Message Richard Huxton 2001-05-25 18:19:47 Re: batch file