Question about new pg12 feature no-rewrite timestamp to timestamptz conversion

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема Question about new pg12 feature no-rewrite timestamp to timestamptz conversion
Дата
Msg-id CAMa1XUiVntazopn4YUpr=QOeAqZ=Z-EK3xvrbJbOcsNzQMqfOQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about new pg12 feature no-rewrite timestamp totimestamptz conversion  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
I have a question about this (really exciting) feature coming in pg12:

Allow ALTER TABLE .. SET DATA TYPE timestamp/timestamptz to avoid a table rewrite when the session time zone is UTC (Noah Misch)

In the UTC time zone, the data types are binary compatible.

We actually want to migrate all of our databases to timestamptz everywhere.  But some of them have historically saved data in a *local* time zone with data type timestamp.

I assume there is no similarly easy way to do this alter type without a table rewrite for a local time zone?  I would assume DST changes would be an issue here.

But it would be really nice if we have a table with timestamp data saved @ America/Chicago time zone, to set the session to 'America/Chicago' and alter type to timestamptz, and similarly avoid a table rewrite.  Is this possible or feasible?

Thank you!
Jeremy

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

Предыдущее
От: Juan José Santamaría Flecha
Дата:
Сообщение: Compile using the Visual Studio 2019
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Multivariate MCV stats can leak data to unprivileged users