Search Postgresql Archives

Re: Reordering columns in a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas Kretschmer wrote:

John McCawley <nospam@xxxxxxxxxxxx> schrieb:
However, in the real world, ...

...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.


Except for the details regarding dependent views and foreign key references... (as someone mentioned mentioned earlier!). And you probably wouldn't want to do that on an in-production system, I would think, although the transaction block prehaps provides appropriate protection.

Regards,
Berend Tober




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux