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 1uHnpt-00A0eq-8O for pgsql-hackers@arkaria.postgresql.org; Wed, 21 May 2025 18:06:37 +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 1uHnpr-009bcj-6d for pgsql-hackers@arkaria.postgresql.org; Wed, 21 May 2025 18:06:35 +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 1uHnpq-009bcb-TR for pgsql-hackers@lists.postgresql.org; Wed, 21 May 2025 18:06:34 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHnpn-000B4l-1o for pgsql-hackers@lists.postgresql.org; Wed, 21 May 2025 18:06:33 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-601dd3dfc1fso7838641a12.0 for ; Wed, 21 May 2025 11:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747850789; x=1748455589; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mey/YPAQkIkt/ymhXBeC9j4WlyegazziQoclHJ/6MtY=; b=dc2oMS+6hLW1XB5456QS9cKtL/8HDhMGkcyjWfk8Q4YCCoGnWOP+Xy2MHUf8E7vx5z 94kaWB0YRYZ6D9wMpn8xHV4mBRfdC6Oc0xHYFoih0VBX/cDEwMG2yhveFNSI+bEuntZh uDUDWrAV9o1qYgrSyi2LaAGrFylw7ABnwQonpnuB9g59PUBM6BWgnjdh6cIsvOaHsVaF NEcjmd1GGEMLKbN5HrMxgmFVlPP9agZwnTBwP2cd0mJa1CqArz6n2lh4Ms6Onj8hPJr5 0w93A9GdDGzk4QEk1qli4rrgXiS3gggBPsCUV+PeVLyS/Imxdhe/qIxOvKABGoJyk2KU ZAVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747850789; x=1748455589; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mey/YPAQkIkt/ymhXBeC9j4WlyegazziQoclHJ/6MtY=; b=DPrDy7y+yM0uUiNpq8kMVdKGOfYcdU/jOCG8QUZkUpbLmyTwaMNUeHwQTaG0FnNXv6 XjRJxTLBFTbu7CPaa/6Q+9A9rkaXZHaxhF/L2heYQDJsrgmc27ZUaWoxeGSUxRuFfzh/ W/H4oD2YMFEu9HyUcoyyhGfr+re4x+kDCKbu+RDUTwo69Oozqq7hy6iQIb/N8tiP0k9v GeT8+b+pR2YZWc9t3c6V7W/5WyUR8Z0WzvDT8te6D4Eai4XizL5LrZVFmLDiI9YSmOqc a5wZ1gn9xMtYkUsUxCD9VmrJJOHZPDpRugp7ESd5Kgr2P7KS3vSjmJDgCTKURSdDpaz2 wc9A== X-Forwarded-Encrypted: i=1; AJvYcCUmr1JQVyjfjzekl1jGbBglM+pe4Ye/4xeMF/ayTiUYBJLCjJUFoUb6bdF5/i/mCRx2rC4+A6uRy1AopT0o@lists.postgresql.org X-Gm-Message-State: AOJu0YyAZrhacwNoyR7nRd53tQRmm4KqDjpUtmQlqw76hSMJjuRVxISD EMAKUt5Ol1bL8yrhczCw1G01rGUzSBNDl6v3j0pvDqqPBSh7Vyd5+iMqyCyXDalsraBwgxjyVU9 4iOrnxOZt6byeQN6/J2dPKxUfHzuKdAw= X-Gm-Gg: ASbGncvVA9juwp5pOXDvJ7FqQDERyNlIvNi5ZG3bhqQ07L3iDsNza7AMbUF64WJemDj BXwSoyw3Izh08mbTGGWIyIhoo7pDE7ePT+z3stFRVmOAo3lPLDwVNgklBhdQIuZO2+DI5PHltKa 1p9ojyiW/YRAWUNjT/2Wvp10SBD6F5rAfv X-Google-Smtp-Source: AGHT+IGq5l+JlzzjptlutocWmsKBwM/b6HAeiShgvQrT3OSoNMVw+DoI5wGDnMq8aqhcHnzzz0U2hk4M6sbtomoNyKc= X-Received: by 2002:a17:906:6a19:b0:acb:34b2:851 with SMTP id a640c23a62f3a-ad536f9d598mr1701840466b.44.1747850789231; Wed, 21 May 2025 11:06:29 -0700 (PDT) MIME-Version: 1.0 References: <145894.1727298237@sss.pgh.pa.us> <88A95900-E976-43BE-A73A-45AA75A11EE7@justatheory.com> <3682F2FE-AB57-4799-A439-7DA518E978A4@gmail.com> In-Reply-To: From: Robert Haas Date: Wed, 21 May 2025 14:06:17 -0400 X-Gm-Features: AX0GCFu7my13VD7aQADWC-lkGGzwwcLN9F71c1b3nhK8c-knBXgyntMOVrwapCo Message-ID: Subject: Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part To: "David E. Wheeler" Cc: Florents Tselai , Alexander Korotkov , Tom Lane , pgsql-hackers , Andrew Dunstan , Peter Eisentraut Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 13, 2025 at 11:00=E2=80=AFPM David E. Wheeler wrote: > On May 13, 2025, at 16:24, Florents Tselai wr= ote: > > As Robert said=E2=80=94and I agree=E2=80=94renaming the existing _tz fa= mily would be more trouble than it=E2=80=99s worth, given the need for depr= ecations, migration paths, etc. If we were designing this today, suffixes l= ike _stable or _volatile might have been more appropriate, but at this poin= t, we=E2=80=99re better off staying consistent with the _tz family. > > I get the pragmatism, and don=E2=80=99t want to over-bike-shed, but what = a wart to live with. [I just went back and re-read Robert=E2=80=99s post, a= nd didn=E2=80=99t realize he used exactly the same expression!] Would it re= ally be too effortful to create _stable or _volatile functions and leave th= e _tz functions as a sort of legacy? No, that wouldn't be too much work, but the issue is that people will keep using the _tz versions and when we eventually try to remove them those people will complain no matter how prominent we make the deprecation notice. If we want to go this route, maybe we should do something like: 1. Add the new versions with a _s suffix or whatever. 2. Invent a GUC jsonb_tz_warning =3D { on | off } that advises you to use the new functions instead, whenever you use the old ones. 3. After N years, flip the default value from off to on. 4. After M additional years, remove the old functions and the GUC. 5. Still get complaints. --=20 Robert Haas EDB: http://www.enterprisedb.com