Re: Reordering columns in a table

Поиск
Список
Период
Сортировка
От John McCawley
Тема Re: Reordering columns in a table
Дата
Msg-id 43BEC7DB.9070108@hardgeus.com
обсуждение исходный текст
Ответ на Re: Reordering columns in a table  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы Re: Reordering columns in a table  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: Reordering columns in a table  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
OK, one last question on the subject and I'll shut up.  I would assume
that all dependent database objects are also dropped when you drop the
table, so you'd have to recreate all of your foreign keys (both
directions) and triggers etc.?

Andreas Kretschmer wrote:

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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim Nasby"
Дата:
Сообщение: Re: Adding another primary key to a populated table
Следующее
От: Berend Tober
Дата:
Сообщение: Re: Reordering columns in a table