Re: table column reordering - Mailing list pgsql-general

From Gregory Stark
Subject Re: table column reordering
Date
Msg-id 87fy13o8he.fsf@oxford.xeocode.com
Whole thread Raw
In response to table column reordering  (Josh Trutwin <josh@trutwins.homeip.net>)
List pgsql-general
"Josh Trutwin" <josh@trutwins.homeip.net> writes:

> A couple things would have saved me lots of time and head scratching:
>
> Being able to execute COPY TABLE where table name is a view - not
> sure why this isn't possible.
>
> Being able to COPY TABLE with the result of a SELECT command where I
> can specify the column order (I think this is in 8.3, great feature)

Even in 8.1 and for as long as I can remember you could specify the columns
you wanted to include and the order they should appear in the copy command.
Try \h COPY in psql (which is similar but not quite the same as \copy)

> Being able to COPY TABLE with the result of a SELECT command where I
> can specify the column order (I think this is in 8.3, great feature)

In fact it's in 8.2 so you could get this feature now by updating to 8.2.5
instead of waiting for 8.3.

> I also just thought of another scenario, I could've created a temp
> table from a SELECT with the correct column order - wish I had
> thought of that before writing this email.

When you think of it put it in an email :)


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-general by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: AUXILIO!!!! CONSULTA SOBRE CURSORES HELP!!! ABOUT CURSORS
Next
From: "Phoenix Kiula"
Date:
Subject: Re: For index bloat: VACUUM ANALYZE vs REINDEX/CLUSTER