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 1tt65O-008a4g-Lh for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2025 14:32:30 +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 1tt65N-0094AP-3o for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2025 14:32:29 +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 1tt5Yj-00883X-RB for pgsql-bugs@lists.postgresql.org; Fri, 14 Mar 2025 13:58:45 +0000 Received: from out-07.pe-bsn.jellyfish.systems ([66.29.159.85]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tt5Yh-002oPe-1w for pgsql-bugs@lists.postgresql.org; Fri, 14 Mar 2025 13:58:44 +0000 Received: from prod-lbout-phx.jellyfish.systems (bsn-02-6.privateemail.com [198.54.118.197]) by pe-bsn.jellyfish.systems (Postfix) with ESMTPA id 4ZDmDc3Ht7z30gf; Fri, 14 Mar 2025 13:58:40 +0000 (UTC) Received: from MTA-08.privateemail.com (unknown [10.50.14.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by BSN-02.privateemail.com (Postfix) with ESMTPS id 4ZDmDc2jnCz3hhTn; Fri, 14 Mar 2025 09:58:40 -0400 (EDT) Received: from mta-08.privateemail.com (localhost [127.0.0.1]) by mta-08.privateemail.com (Postfix) with ESMTP id 4ZDmDc1ML5z3hhW5; Fri, 14 Mar 2025 09:58:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=viktorh.net; s=default; t=1741960720; bh=HXknTzg2tVpOd6P89nCMajqiuV30u4aSxPF9cghlsXo=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=McNOYFynD509ICG8BEfNhGOdOTuICjdmjLZ5hFGMFy4D2LhGQRCjy+FalACLyJMwn ndlFS8koVMmQf4pH8yxJSyKuQ3oUykXfwqOyiCBcB2/5Ws5RZWk0dhuhwJqy0Ann9q 6xX8+c2eL3/EX/Stn4YX2fswuAbBYlAyQi2dls2RP4YUlpnUYpgZFGzStE16GJSwQt gwsAvjqUg2dU2lbs74u+e1fVSCZjfW1unH1cHmJsPIKVM9wAWpi3jkLarGcXClSp3n Vcg1shPTk1OvyDcU/VqeOoNIRnLrWloMzhu7hsH4+L5tcM05t6+0espRW0eYko775f dj/vMoTkZh2Jw== Received: from [10.34.123.152] (unknown [80.87.18.224]) by mta-08.privateemail.com (Postfix) with ESMTPA; Fri, 14 Mar 2025 09:58:38 -0400 (EDT) Date: Fri, 14 Mar 2025 13:58:25 +0000 From: Viktor Holmberg To: Daniel Gustafsson Cc: pgsql-bugs@lists.postgresql.org Message-ID: In-Reply-To: <51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se> References: <790bc1f9-74dc-4b50-94d2-8147315b1556@Spark> <51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se> Subject: Re: ISN extension - wrong volatility level for isn_weak() function X-Readdle-Message-ID: c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="67d43609_6ceaf087_1881" X-Virus-Scanned: ClamAV using ClamSMTP List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --67d43609_6ceaf087_1881 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Yes, you=E2=80=99re right Daniel. I ended up settling on the following wo= rkaround: ALTER =46UNCTION isn=5Fweak() VOLATILE; ALTER =46UNCTION public.isn=5Fweak(boolean) VOLATILE; /Viktor Holmberg On 14 Mar 2025 at 13:30 +0000, Daniel Gustafsson , wro= te: > > On 14 Mar 2025, at 12:49, Viktor Holmberg wrote: > > > > Hello. Apologies if this is not the right place to bug report extensi= ons > > =46or an extension bundled in postgres contrib it's absolutely the righ= t place. > > > The isn=5Fweak function in the isn extension reports the wrong value = if you look at it inside a transaction: > > > I can manually fix this by changing it to STABLE: > > > > ALTER =46UNCTION isn=5Fweak() STABLE; > > > > Am I missing something or isn=E2=80=99t this quite weird=3F Would it = at least be possible to change the documentation to explain this=3F > > I wonder if this should really be marked VOLATILE instead as it has a s= ide > effect. > > -- > Daniel Gustafsson > --67d43609_6ceaf087_1881 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Yes, you=E2=80=99re right Daniel. I ended up settli= ng on the following workaround:

ALTER =46UNCTION isn=5Fweak() VOLATILE;
ALTER =46UNCTION public.isn=5Fweak(boolean) VOLATILE;

/Viktor Holmberg
On 14 Mar 2025 at 13:30 +0000, Dani= el Gustafsson <daniel=40yesql.se>, wrote:
On 14 Mar 2025, at 12:49, Viktor Holmberg &= lt;v=40viktorh.net> wrote:

Hello. Apologies if this is not the right place to bug report extensions<= br />

=46or an extension bundled in postgres contrib it's absolutely the right = place.

The isn=5Fweak function in the isn extensio= n reports the wrong value if you look at it inside a transaction:

I can manually fix this by changing it to S= TABLE:

ALTER =46UNCTION isn=5Fweak() STABLE;

Am I missing something or isn=E2=80=99t this quite weird=3F Would it at l= east be possible to change the documentation to explain this=3F

I wonder if this should really be marked VOLATILE instead as it has a sid= e
effect.

--
Daniel Gustafsson

--67d43609_6ceaf087_1881--