Re: Change order of table-columns in pg_catalog.pg_attribute.attnum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Change order of table-columns in pg_catalog.pg_attribute.attnum
Дата
Msg-id 21001.1181141959@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Change order of table-columns in pg_catalog.pg_attribute.attnum  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Change order of table-columns in pg_catalog.pg_attribute.attnum
Список pgsql-admin
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Erwin Brandstetter escribi�:
>> If I want to change the default order of two columns of a table, can I
>> just manipulate the values in
>> pg_catalog.pg_attribute.attnum?

> It works -- as long as the table is empty.

And as long as you have no views, foreign keys, indexes, defaults,
rules, etc etc etc referencing the columns.

Short answer is don't even think of trying it.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Change order of table-columns in pg_catalog.pg_attribute.attnum
Следующее
От: Erwin Brandstetter
Дата:
Сообщение: Re: Change order of table-columns in pg_catalog.pg_attribute.attnum