Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tezCm-00GmhN-6P for pgsql-docs@arkaria.postgresql.org; Mon, 03 Feb 2025 16:21:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tezCl-00EyNl-Az for pgsql-docs@arkaria.postgresql.org; Mon, 03 Feb 2025 16:21:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tezCl-00EyNd-1g for pgsql-docs@lists.postgresql.org; Mon, 03 Feb 2025 16:21:47 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tezCi-002yKu-3D for pgsql-docs@lists.postgresql.org; Mon, 03 Feb 2025 16:21:46 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id A28C81140141; Mon, 3 Feb 2025 11:21:44 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Mon, 03 Feb 2025 11:21:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738599704; x=1738686104; bh=r ikZlgRC0YAdV+3Cz49R0kNpKVTcqjYejtyMREveHzg=; b=ea8Ps6IWjemA0bGou oNmmqTpHAGOUgLfVYiduQC+5pPciaJXdRHGkFICyjIl02ZhYaDSGnxKNRT0OGTkW +ZYBU0/Ycnj/fFsowtBHeNyFyUjZDiQttk+g2CrF9F5kYfmHE5ni9uQvEmWty1pL P51ktXHLoEJma73r41HtMu5igYY8kpr2m1U6JTxO7L6kRLKsXDs7IlsuKCCbqyHo KtKg9P7Bl4dcxad4hzxlB1mgebNZVWpId4vYyi3D43Mfp/QdYIyHFND1n6YWAq+Z 4FWt7pA2IR6Odwde+DmOMSygYc/Kxsv4OaT+m2NElKNrPvk+u4ptbuYRIw3IEgbR ufc0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeeihefguefgtdehkeeggedv ueeuheffudehueehvedttefhteegheevtdfghfehheenucffohhmrghinhepghhithhhuh gsrdgtohhmpdhrvggrughmvgdrmhgupdgvnhhtvghrphhrihhsvggusgdrtghomhenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrh hrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopeehpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehlrghurhgvnhiirdgrlhgsvgestgihsggvrhhtvg gtrdgrthdprhgtphhtthhopegsrhhishhtlhgvtghonhgvfigvsgesghhmrghilhdrtgho mhdprhgtphhtthhopehpghhsqhhlqdguohgtsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphht thhopehrohgsseigiihilhhlrgdrnhgvth X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Feb 2025 11:21:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738599701; bh=wCBVaHEzGVs6rMAF2MD+X44zGj/Om+T5KK92pfiZHVI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=dlwZZrg7OAT/iw1X94TqRulC3NoFlzMWHWCLtEnJeeT5HHGh0pVkLqhBcpUkMRQ1h fU2Tedi7wA942eUGA+Xe+O6ZTKzpt2llHMo8WXNuFP8XKC9AAZVB+W8f/T1DTEIsQD WQn0IO0P24H5umCkLbYD1NpWDrffLwkWGn9NBfQUmDdbKiaDgTJ58dmxOvvG0ZL5Z9 hy5ufzPLpf+oNZrHjmQ/LJfHT5/pGrlN5TBvJ7hsQ+9Rw7DYOdBweogoMoKtNqpJQA /yQeUU8BYMg0OgNgTlO1ZjPQZBrcnm7nNka7GToKeinnOfwHQumrTPqKQgRjyGC1nW qG6zR6lAcOZ7w== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 48C078F; Mon, 3 Feb 2025 17:21:41 +0100 (CET) Date: Mon, 3 Feb 2025 17:21:41 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Robert Treat Cc: Tom Lane , Laurenz Albe , bristleconeweb@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: timestamp with time zone ~> GMT Message-ID: <202502031621.j4h5q2bp3orj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 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)