agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Treat <rob@xzilla.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: bristleconeweb@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: timestamp with time zone ~> GMT
Date: Mon, 3 Feb 2025 17:21:41 +0100
Message-ID: <202502031621.j4h5q2bp3orj@alvherre.pgsql> (raw)
In-Reply-To: <CABV9wwOfPK_NtzfPf4Kh4SvkxUHZpP6YprquQwPTndEnB7JSwA@mail.gmail.com>

On 2025-Feb-03, Robert Treat wrote:

> This does seem to come up often enough that it probably is worth being
> a bit more explicit about how this works; attached patch attempts
> that.

LGTM.

> Note, I dropped the bit about GMT; that change was made ~40 years ago,
> and I suspect it is close to noise for many people these days, though
> it could be added back if folks feel strongly about it.

I don't feel strongly about it, but another option might be to add a
<footnote> so that it is still there but less intrusive.  Grepping for
GMT in the postgres repo there are still over 1400 matches of all kinds.

> As Tom notes above, what to store is debatable, and generally seems to
> conflate storage and display desires together, which makes it hard to
> imagine a generic enough implementation to put into core, but there
> are some attempts to solve this problem floating around in extension
> land. See https://github.com/mweber26/timestampandtz/blob/master/README.md
> as one such attempt.

Another simple option is to store a timezone name in a separate column,
which you can then use in the AT TIME ZONE clause.  This is of course
more wasteful than storing a 2-byte zone identifier as the
timestampandtz extension does.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos (bis) / con todos los humanos acabaré ¡acabaré! (Bender)





view thread (12+ messages)  latest in thread

Message-ID: <202502031621.j4h5q2bp3orj@alvherre.pgsql>
Permalink:  ../202502031621.j4h5q2bp3orj@alvherre.pgsql/
Also on:    postgresql.org/message-id/202502031621.j4h5q2bp3orj@alvherre.pgsql

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, rob@xzilla.net, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, bristleconeweb@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: timestamp with time zone ~> GMT
  In-Reply-To: <202502031621.j4h5q2bp3orj@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox