Re: full featured alter table?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: full featured alter table?
Дата
Msg-id 12914.1055863104@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: full featured alter table?  (Shane Dawalt <shane.dawalt@wright.edu>)
Список pgsql-general
Shane Dawalt <shane.dawalt@wright.edu> writes:
>    I have been following this thread with great interesting and
> perplexity.  I have yet to understand the reasoning behind this proposed
> addition.

The original takeoff point was the observation that you couldn't build
"ALTER COLUMN TYPE" out of the existing spare parts: you can make a new
column, load it with the old data, and drop the old column (with a
rename somewhere along the line) ... but this leaves you with the new
column at the end, so it's not a fully transparent substitution.

>    Insofaras rearranging the internal table is concerned, I don't
> believe the pg people had that intent in mind at all. It may have been
> the intent of the original poster, but I think most everyone agrees that
> the back-end knows far better than us humans what is more optimal for
> table layout.

Indeed, but under the constraints of the SQL spec, the backend is not
free to change the visible column order for implementation reasons.
If we were to decouple logical and physical order as this thread is
suggesting, then the door *would* be open to perform that sort of
optimization.

            regards, tom lane

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

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: order of nested loop
Следующее
От: alexis
Дата:
Сообщение: postgresql + jboss