Re: Re-order columns?

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Re-order columns?
Дата
Msg-id 20200729212039.GT12375@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Re-order columns?  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin
Greetings,

* Holger Jakobs (holger@jakobs.com) wrote:
> Actually, the order of columns is of _no_ importance, since columns are identified by name and not by column number.
It'sthe same as the order of rows in a table - undefined (unless you use order by). 
>
> That columns appear to have some kind of order and show in tools with a stable order has technical reasons and is not
rootedin relational theory. 

There's very practical reasons to think about the ordering of columns,
at least in PostgreSQL- you can end up creating holes in your row if you
order the columns in the wrong way and that can lead to wasted space.

There was a patch floating around to allow re-ordering, which would also
then allow us to re-order the row underneath to avoid wasting space (as
much as possible, anyway) which would be really rather nice, but sadly
it didn't get enough push on it to make it happen.

Thanks,

Stephen

Вложения

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

Предыдущее
От: Olivier Gautherot
Дата:
Сообщение: Re: Re-order columns?
Следующее
От: Sidney Aloisio Ferreira Pryor
Дата:
Сообщение: RE: How can i be certain autovacuum is causing reuse if table still grows