Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE - Mailing list pgsql-general

From scott.marlowe
Subject Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE
Date
Msg-id Pine.LNX.4.33.0311060758330.12004-100000@css120.ihs.com
Whole thread Raw
In response to INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE COLUMNS  (Marco Lazzeri <marcomail@noze.it>)
Responses Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and
Re: Sequences without blank holes
List pgsql-general
On Thu, 6 Nov 2003, Marco Lazzeri wrote:

> I need, also, to move columns in tables (just like the MOVE BEFORE/MOVE
> AFTER MySQL commands). Can you help me?

I do it with select into:

begin;
select field3, field2, field4, field1 into newtable from oldtable;
drop oldtable;
alter table newtable rename to oldtable;
commit; (or rollback; if something goes wrong).


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with PLPGSQL
Next
From: Andrew Rawnsley
Date:
Subject: New eRServer patch/fork release