Re: reorder columns? - Mailing list pgsql-general

From scott.marlowe
Subject Re: reorder columns?
Date
Msg-id Pine.LNX.4.33.0210071142360.23347-100000@css120.ihs.com
Whole thread Raw
In response to reorder columns?  ("Andy Kriger" <akriger@greaterthanone.com>)
List pgsql-general
On Mon, 7 Oct 2002, Andy Kriger wrote:

> is there a way to reorder columns in psql?
> or to alter table and add columns after a specified columns?
>
> if not, is my only option to recreate the table with columns in the desired
> order and select into that table?

Pretty much, but you can do it all at once with a statement like:

select field2, field5, field4, field1, field3 into newtable from oldtable




pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: [HACKERS] Hot Backup
Next
From: Jean-Luc Lachance
Date:
Subject: Re: Efficient date range search?