pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viktor Holmberg <v@viktorh.net>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: ISN extension - wrong volatility level for isn_weak() function
Date: Fri, 14 Mar 2025 13:58:25 +0000
Message-ID: <c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark> (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>

Yes, you’re right Daniel. I ended up settling on the following workaround:

ALTER FUNCTION isn_weak() VOLATILE;
ALTER FUNCTION public.isn_weak(boolean) VOLATILE;

/Viktor Holmberg
On 14 Mar 2025 at 13:30 +0000, Daniel Gustafsson <daniel@yesql.se>, wrote:
> > On 14 Mar 2025, at 12:49, Viktor Holmberg <v@viktorh.net> wrote:
> >
> > Hello. Apologies if this is not the right place to bug report extensions
>
> For an extension bundled in postgres contrib it's absolutely the right place.
>
> > The isn_weak 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 FUNCTION isn_weak() STABLE;
> >
> > Am I missing something or isn’t this quite weird? Would it at least be possible to change the documentation to explain this?
>
> I wonder if this should really be marked VOLATILE instead as it has a side
> effect.
>
> --
> Daniel Gustafsson
>

view thread (15+ messages)  latest in thread

Message-ID: <c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark>
Permalink:  ../c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark/
Also on:    postgresql.org/message-id/c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark

 · 

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: v@viktorh.net, daniel@yesql.se, pgsql-bugs@lists.postgresql.org
  Subject: Re: ISN extension - wrong volatility level for isn_weak() function
  In-Reply-To: <c8b28acd-2d6e-4653-a03b-7041cf5e0be3@Spark>

* 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