Re: Smaller data types use same disk space

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Smaller data types use same disk space
Дата
Msg-id c92dc343-73d1-47d8-86c8-a57414b6b9b6@mm
обсуждение исходный текст
Ответ на Re: Smaller data types use same disk space  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
    Tom Lane wrote:

> > That's a controversial point: doing it that way makes reordering of
> > large tables highly impractical.
>
> In particular, if the implementation works like that, you hardly need
> any system support at all.  You can do the equivalent today with a few
> SQL commands: create a new table by selecting columns from the old,
> drop old table, rename new into place.  The universal assumption has
> been that REORDER COLUMNS needs to work by just adjusting a few catalog
> entries, or it's not worth bothering with.

But if the table has indexes, triggers, integrity constraints, check
constraints, or default values for columns, moving these after a CREATE TABLE
AS select ... is not easy.
Personally, every time I had the need to reorder columns, having it as a fast
operation was irrelevant to me, whereas figuring out how to deal with the
above was the time-consuming part.
If we had the feature but it was as slow as say, CLUSTER, that would already
be quite nice.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Smaller data types use same disk space
Следующее
От: BJ Freeman
Дата:
Сообщение: Re: upgrade causes psql to not work