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 1tKpmv-00B3Xx-GQ for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Dec 2024 02:15:49 +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 1tKpmt-00E9U9-1E for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Dec 2024 02:15:48 +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 1tKpjo-00E5Y4-D8 for pgsql-bugs@lists.postgresql.org; Tue, 10 Dec 2024 02:12:37 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tKpjm-002077-AD for pgsql-bugs@lists.postgresql.org; Tue, 10 Dec 2024 02:12:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4BA2CWlc4167040; Mon, 9 Dec 2024 21:12:32 -0500 From: Tom Lane To: Michael Paquier cc: Aleksander Alekseev , pgsql-bugs@lists.postgresql.org Subject: Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres' In-reply-to: References: <3416600.1730987836@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Tue, 10 Dec 2024 09:26:02 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4167038.1733796752.1@sss.pgh.pa.us> Date: Mon, 09 Dec 2024 21:12:32 -0500 Message-ID: <4167039.1733796752@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > FWIW, I have a hard time understanding why ignoring "LMT", which is > a timezone abbreviation meaning "Local Mean Time", in datetktbl[], > which is a table for date/time keywords, is the right thing to do. I agree. We should be mapping it to whatever GMT offset "LMT" means in the selected zone (assuming there is an entry, which it seems like there is in most of them). I've not gotten around to looking at what that would take, but it's probably not entirely trivial, since it would mean different GMT offsets in different zones. One thing that might be interesting to look at is whether the same mechanism could be used for other TZ abbreviations defined by the tzdb data, instead of relying on our hard-wired lists. > Worth noting that we may want to do something in ECPG's dt_common.c as > well, that holds a similar table with TZ abbreviation data and LMT is > missing there? ECPG's datetime support is so far behind the server's that it's kind of sad. But bringing it up to speed would be a large investment of effort, something I for one am not prepared to put into it. I sure don't think we should hold up fixing this on the server side pending making that happen. regards, tom lane