Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-16 Thread Noah Misch
On Sat, Jan 16, 2021 at 12:03:19PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Wed, Jan 13, 2021 at 10:28:26AM -0500, Tom Lane wrote: > >> So a non-rewriting conversion would only be possible if local time is > >> identical to UTC; which is true for few enough people that nobody has > >> bo

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-16 Thread Tom Lane
Noah Misch writes: > On Wed, Jan 13, 2021 at 10:28:26AM -0500, Tom Lane wrote: >> So a non-rewriting conversion would only be possible if local time is >> identical to UTC; which is true for few enough people that nobody has >> bothered with attempting the optimization. > PostgreSQL 12 and later

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-16 Thread Noah Misch
On Wed, Jan 13, 2021 at 10:28:26AM -0500, Tom Lane wrote: > So a non-rewriting conversion would only be possible if local time is > identical to UTC; which is true for few enough people that nobody has > bothered with attempting the optimization. PostgreSQL 12 and later do have that optimization.

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-13 Thread Tom Lane
"David G. Johnston" writes: > On Wed, Jan 13, 2021 at 6:59 AM Ashutosh Bapat > wrote: >> +01 indicates that there's timezone information added to the data, so >> the rows aren't identical. Here's some more SQL run on my laptop which >> shows that > This is indeed true but examples that use the t

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-13 Thread David G. Johnston
On Wed, Jan 13, 2021 at 6:59 AM Ashutosh Bapat wrote: > +01 indicates that there's timezone information added to the data, so > the rows aren't identical. Here's some more SQL run on my laptop which > shows that > This is indeed true but examples that use the textual representation of the data d

Re: Alter timestamp without timezone to with timezone rewrites rows

2021-01-13 Thread Ashutosh Bapat
On Wed, Jan 13, 2021 at 4:24 PM Dorian Hoxha wrote: > > Hi team, > > I have a table with a column of "timestamp without timezone" and I want to > alter it to a column of "timestamp with timezone" without rewriting the rows. > > Looking at the docs, and doing some quick tests, the data-on-disk is

Alter timestamp without timezone to with timezone rewrites rows

2021-01-13 Thread Dorian Hoxha
Hi team, I have a table with a column of "timestamp without timezone" and I want to alter it to a column of "timestamp with timezone" without rewriting the rows. Looking at the docs, and doing some quick tests, the data-on-disk is identical for both columns. But when doing an alter table, looks l