Re: Alter table - Mailing list pgsql-general

From scott.marlowe
Subject Re: Alter table
Date
Msg-id Pine.LNX.4.33.0307301100110.24999-100000@css120.ihs.com
Whole thread Raw
In response to Alter table  ("Guillaume Houssay" <ghoussay@noos.fr>)
List pgsql-general
On Wed, 30 Jul 2003, Guillaume Houssay wrote:

> I am looking for the SQL query to add a column in a table and having
> the column at specific position in the table (not at the end of the
> table).
>
> Do you have any idea ?

I think that's a TODO item (i.e. it's not implemented yet.)

Currently you'd have to either pg_dump and rearrange your data, or
recreate the table with a select into / insert from select type thing.

select field1, field2, field4, ''::text as newfield, field3 into newtable
from oldtable;


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Diff between contrib/dbmirror and rserv
Next
From: Richard Huxton
Date:
Subject: Re: Alter table