Re: Reordering columns in a table - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: Reordering columns in a table
Date
Msg-id 20060106193959.GD1989@kaufbach.delug.de
Whole thread Raw
In response to Re: Reordering columns in a table  (John McCawley <nospam@hardgeus.com>)
Responses Re: Reordering columns in a table
Re: Reordering columns in a table
List pgsql-general
John McCawley <nospam@hardgeus.com> schrieb:
> However, in the real world, columns are often added willy-nilly as they are
> needed, and it is not immediately obvious which, if any, of the columns
> will be related.  Later, solely for visual clarity, it is desirable to have
> the ability to reorder the columns in the database.  I wouldn't depend on

I understand you, but i repeat Joshua and Berend: PostgreSQL hasn't a
build-in solution for this.
And i think, other systems do this:

- begin
- create a new temp. table with the new order
- insert all values from the old table in the new temp. table
- drop the old table
- rename the temp. table to the old table name
- commit

You can do the same, no problem.


HTH, Andreas, and sorry for my bad english
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: 'Official' definition of ACID compliance?
Next
From: "Jim Nasby"
Date:
Subject: Re: Adding another primary key to a populated table