pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Viktor Holmberg <v@viktorh.net>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: ISN extension - wrong volatility level for isn_weak() function
Date: Fri, 14 Mar 2025 10:16:24 -0400
Message-ID: <3052531.1741961784@sss.pgh.pa.us> (raw)
In-Reply-To: <51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se>
References: <ae6ed432-4491-4030-be20-3ea69d03a098@Spark>
	<790bc1f9-74dc-4b50-94d2-8147315b1556@Spark>
	<51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> On 14 Mar 2025, at 12:49, Viktor Holmberg <v@viktorh.net> wrote:
>> The isn_weak function in the isn extension reports the wrong value if you look at it inside a transaction:

> I wonder if this should really be marked VOLATILE instead as it has a side
> effect.

Indeed.  This whole area seems really poorly considered.  The comment
in isn--1.1.sql says

-- isn_weak(boolean) - Sets the weak input mode.
-- This function is intended for testing use only!

despite which it's documented at length in isn.sgml.  On the other
hand, so far as I can find it's tested nowhere, which means none
of the "weak mode" code is getting exercised.

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <3052531.1741961784@sss.pgh.pa.us>
Permalink:  ../3052531.1741961784@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3052531.1741961784@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, v@viktorh.net, pgsql-bugs@lists.postgresql.org
  Subject: Re: ISN extension - wrong volatility level for isn_weak() function
  In-Reply-To: <3052531.1741961784@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox