Re: ISN extension - wrong volatility level for isn_weak() function
Viktor Holmberg <v@viktorh.net>
From: Viktor Holmberg <v@viktorh.net>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-03-14T13:58:25Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
contrib/isn: Make weak mode a GUC setting, and fix related functions.
- 44890442398c 18.0 landed
-
Update contrib/seg for new scalarlesel/scalargesel selectivity functions.
- 44ba29206449 11.0 cited
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 >