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 1rNyqL-00068b-IG for pgsql-general@arkaria.postgresql.org; Thu, 11 Jan 2024 17:27:50 +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 1rNyqI-00DgMo-8l for pgsql-general@arkaria.postgresql.org; Thu, 11 Jan 2024 17:27:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNyqH-00DgMX-UL for pgsql-general@lists.postgresql.org; Thu, 11 Jan 2024 17:27:45 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNyqF-00139k-2N for pgsql-general@lists.postgresql.org; Thu, 11 Jan 2024 17:27:44 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 283C43200B20; Thu, 11 Jan 2024 12:27:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 11 Jan 2024 12:27:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1704994059; x=1705080459; bh=hw0RdaW4jmAfEeqRrj6uHaI4kUndGjQ0pRpn2+Hopzw=; b= ZrAyPaE9Ek8s0oUUNwXvfv9VVO9c8UqyLiyBbVA63AyEBLvAVxTZhkiS6zAS0F6z fgHwPcic8MjNnGREM+3cFfhy6RRWzZcts5m+STZhvoXh5deQ1dBOfsTAPqpCeybA TtvgRQJGukuJ3Y0HS3GrNvtaCMJ/fKESJExiXfxFJLzvkG1Nk9ert/9OabEzqK7j dCc//AfxNMH3hFBZmGIUqSURV4/TbtVj+COHf5bhy9l65lRRYgp3B1lTs7GwXDya bVHhbaupMsm6bnrLoJTrX7mk4a3SUfm5ZnxTEMGN7+RL9g3FPXeu/41/Po91y4VK 0jgWIwmq5EPwlDrMj3DjWw== 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 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704994059; x= 1705080459; bh=hw0RdaW4jmAfEeqRrj6uHaI4kUndGjQ0pRpn2+Hopzw=; b=g bblXD2D2YgFZd8mzzyVsG1kefkWGt8KXZSp2tfKM9iCofOqHAifsB6O5/8w1tCdS SjB1QjCJjPQb9l7B1yWzFA8bPm2fqzJVrWXHPdNHECjakYMFoG4OSx0+aYQwSES0 wsQeKmqKj6MAY6M8W5emp9G9Q5rQ+Ee/JKFQDflm02pU6gr2uNH32SXVW2GMvtKR MywID83Hmv+0SePGYdBnemrI4TCPJ03yQPUT6i+L+cAUmd24+I5NdsuJBqL1/FQ9 nDClpH8jPh3d2j5EQ9cmBUNnivgfeqBqE8Sk1Kx6/4Sh3PHTjVywSL+ThP0XNVy9 nnBSoILaLGR4wn0BEyVfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeifedgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfevfhgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepveeftedutdehfefggeeltdevleevgeffjeeivddt teeivedtjeefudetiedtudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 11 Jan 2024 12:27:38 -0500 (EST) Message-ID: <5fb4d1a8-0597-4f87-9a6b-db1a99b0ebfe@aklaver.com> Date: Thu, 11 Jan 2024 09:27:37 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Time zone offset in to_char() Content-Language: en-US From: Adrian Klaver To: Alban Hertroijs , Karsten Hilbert Cc: "pgsql-general@lists.postgresql.org" References: <37804bda-ebe5-4786-be63-4d2a325368a6@aklaver.com> In-Reply-To: <37804bda-ebe5-4786-be63-4d2a325368a6@aklaver.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/11/24 08:48, Adrian Klaver wrote: > On 1/11/24 08:04, Alban Hertroijs wrote: >> The drawback, as mentioned, being that we need to maintain those >> functions in each deployment, which is a bit of a hassle (albeit a >> minor one) because we need to customise both the TDV side and the >> PostgreSQL side in that case. Our preferred solution would be to just >> add a few entries to the TDV database-specific capabilities file (as >> described in my initial message) > > Are you referring to?: > > "It currently have this: > ToDatetimeOffsetNL(~any) : ciscache.ToDatetimeOffsetNL($1) > ToDatetimeOffset(~any,~any) : ciscache.ToDatetimeOffset($1, $2) > " It finally dawned on me, you want to replace the user defined functions above with Postgres builtins only. Try as I might I could not come with that solution. > > I thought the issue there was maintaining the two Postgres functions? > > >> Provided that such a solution is possible, that is. If not, my current >> approach may have to suffice. >> >> The reason I decided to ask on the ML is that I'm finding it hard to >> believe that this transformation would be this difficult, so I expect >> that I must be missing something. >> >> Regards, >> Alban Hertroys > -- Adrian Klaver adrian.klaver@aklaver.com