Re: reorder columns?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Andy Kriger <akriger(at)greaterthanone(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: reorder columns?
Date: 2002-10-07 17:43:27
Message-ID: Pine.LNX.4.33.0210071142360.23347-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Kriger 2002-10-07 17:43:58 reorder columns?
Previous Message Jean-Luc Lachance 2002-10-07 17:36:11 Re: Efficient date range search?