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 1stZB5-00HQGn-7k for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2024 21:04:03 +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 1stZB4-00EMQ3-Gs for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2024 21:04:02 +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 1stZB4-00EMOC-6Z for pgsql-hackers@lists.postgresql.org; Wed, 25 Sep 2024 21:04:02 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1stZB0-00152e-BN for pgsql-hackers@lists.postgresql.org; Wed, 25 Sep 2024 21:04:01 +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 48PL3vcV145895; Wed, 25 Sep 2024 17:03:57 -0400 From: Tom Lane To: Florents Tselai cc: pgsql-hackers Subject: Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part In-reply-to: References: Comments: In-reply-to Florents Tselai message dated "Wed, 25 Sep 2024 21:17:20 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <145893.1727298237.1@sss.pgh.pa.us> Date: Wed, 25 Sep 2024 17:03:57 -0400 Message-ID: <145894.1727298237@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Florents Tselai writes: > This patch is a follow-up and generalization to [0]. > It adds the following jsonpath methods: lower, upper, initcap, l/r/btrim, > replace, split_part. How are you going to deal with the fact that this makes jsonpath operations not guaranteed immutable? (See commit cb599b9dd for some context.) Those are all going to have behavior that's dependent on the underlying locale. We have the kluge of having separate "_tz" functions to support non-immutable datetime operations, but that way doesn't seem like it's going to scale well to multiple sources of mutability. regards, tom lane