From: Guyren Howe <guyren@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Subject: Re: Content for talk on Postgres Type System at PostgresConf
Date: Thu, 29 Feb 2024 15:07:29 -0800
Message-ID: <201DD701-98E4-4349-9CF3-DBBF80700992@gmail.com> (raw)
In-Reply-To: <2758726.1709247071@sss.pgh.pa.us>
References: <F9A4875C-503C-4D1F-8AA6-0C204F60D3F4@gmail.com>
<08e99a8fa744e063ea31030d6516bfc64c26e3f8.camel@cybertec.at>
<372fd5d1-8d7c-411e-8a35-41793978e74b@Spark>
<CAKFQuwbOXtDcYMM5SMbUNoxOSLCEjEgLG7qwnG2h15Vs51X69Q@mail.gmail.com>
<2758726.1709247071@sss.pgh.pa.us>
On 29 Feb 2024, at 14:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>>> - time with time zone *does* store the time zone, but this isn’t
>>> actually useful and should be avoided (I’m not entirely sure why and the
>>> docs only gesture at the problems without stating them, IIRC)
>
>> No it doesn't store the time zone. Nor do the docs say they do. And
>> clearly point out the issue that evaluating a time zone without both date
>> and time inputs is basically pointless.
>
> timetz *does* store a time zone, in the sense of storing a numeric
> offset from UTC (i.e., "so many minutes east or west of Greenwich").
> The problem is that in most real-world applications your notion of
> "time zone" probably includes annual DST changes, which timetz can't
> represent. I don't say the type is completely useless, but its
> usefulness is a lot less than you might guess.
The closest I can come to this in the docs is:
"The appropriate time zone offset is recorded in the time with time zone value and is output as stored; it is not adjusted to the active time zone.”
I expect to be submitting some documentation updates as part of this project, fwiw.=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: guyren@gmail.com, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, laurenz.albe@cybertec.at
Subject: Re: Content for talk on Postgres Type System at PostgresConf
In-Reply-To: <201DD701-98E4-4349-9CF3-DBBF80700992@gmail.com>
References: <F9A4875C-503C-4D1F-8AA6-0C204F60D3F4@gmail.com> <08e99a8fa744e063ea31030d6516bfc64c26e3f8.camel@cybertec.at> <372fd5d1-8d7c-411e-8a35-41793978e74b@Spark> <CAKFQuwbOXtDcYMM5SMbUNoxOSLCEjEgLG7qwnG2h15Vs51X69Q@mail.gmail.com> <2758726.1709247071@sss.pgh.pa.us> <201DD701-98E4-4349-9CF3-DBBF80700992@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox