Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and

From: Marco Lazzeri <marcomail(at)noze(dot)it>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and
Date: 2003-11-06 15:25:18
Message-ID: 1068132317.24598.21.camel@macbeth.intranet.noze.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Il gio, 2003-11-06 alle 16:00, scott.marlowe ha scritto:
> > 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).

Good idea! But you'll lose CONSTRAINTs and DEFAULTs. Isn't it?

Cheers,
Marco

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2003-11-06 15:30:39 Fixed column format data
Previous Message Andrew Rawnsley 2003-11-06 15:21:32 New eRServer patch/fork release