Re: Converting timestamp to timestamptz without rewriting tables

From: Corey Taylor <corey(dot)taylor(dot)fl(at)gmail(dot)com>
To: Tom Dunstan <pgsql(at)tomd(dot)cc>
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Converting timestamp to timestamptz without rewriting tables
Date: 2017-12-18 08:23:47
Message-ID: CADBz387Cifcu6Mh4iooNFO+CzwG00y1-BC6j+nrAWnLV7om0hw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 18, 2017 at 2:18 AM, Tom Dunstan <pgsql(at)tomd(dot)cc> wrote:
>
>>
>> A timestamptz stores everything as UTC and the value is converted to the
session time zone upon retrieval.
>
>
> Which is exactly what we want.

If a random person can interject here, I believe what Tom Dunstan is asking
about here is the cheapest way to do a raw conversion of *all* columns in
*all* tables with the underlying assumption that the data does not need to
be touched at all (as the data representation is the same between timestamp
and timestamptz).

Hence he is showing manipulating the pg_attribute and pg_table values.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yogesh Sharma 2017-12-18 10:02:43 Re: Size of pg_multixact/members increases 11355
Previous Message Tom Dunstan 2017-12-18 08:18:00 Re: Converting timestamp to timestamptz without rewriting tables