Re: changing field length

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jodi Kanter <jkanter(at)virginia(dot)edu>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: changing field length
Date: 2003-08-20 15:18:31
Message-ID: 20030820151831.GA13575@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Aug 20, 2003 at 11:16:18 -0400,
Jodi Kanter <jkanter(at)virginia(dot)edu> wrote:
> Ok. so for now I want to return to where I started. so I renamed the
> table and regenerated my original table with the fields in the order
> that I like. I cannot just do a
> insert into table select * from other_table;
> because the fields are in a different order.
> Can I do this by listing the fields in my insert in the order in which I
> want them placed?

Yes. Instead of using '*' list the columns from the table that currently
has the data in the order that they appear in the table that is currently
empty.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mendola Gaetano 2003-08-20 15:19:11 Re: Explicit Cast
Previous Message Mendola Gaetano 2003-08-20 15:16:53 Re: Need Help on query tuning