public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Victor Yegorov <[email protected]>
Cc: Pierre Forstmann <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Unexpected results from CALL and AUTOCOMMIT=off
Date: Mon, 03 Jun 2024 15:28:10 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGnEbojf5Awm862ghvooLku6mm0m4yF60PyHQxCinM8pn01sbw@mail.gmail.com>
References: <CAGnEboiRe+fG2QxuBO2390F7P8e2MQ6UyBjZSL_w1Cej+E4=Vw@mail.gmail.com>
<CAM-sOH80Z=OqYBWgYP=BDGLbxQ72wkC9=tZ-vRKxkmKkhTD7MQ@mail.gmail.com>
<CAGnEbojf5Awm862ghvooLku6mm0m4yF60PyHQxCinM8pn01sbw@mail.gmail.com>
Victor Yegorov <[email protected]> writes:
> пн, 3 июн. 2024 г. в 20:40, Pierre Forstmann <[email protected]>:
>> If you remove stable from function declaration, it works as expected:
> ... therefore I assume STABLE should work in this case. Well, it seems not
> to.
I agree that this looks like a bug, since your example shows that the
same function works as-expected in an ordinary expression but not in
a CALL. The dependency on AUTOCOMMIT (that is, being within an outer
transaction block) seems even odder. I've not dug into it yet, but
I suppose we're passing the wrong snapshot to the CALL arguments.
A volatile function wouldn't use that snapshot, explaining Pierre's
result.
regards, tom lane
view thread (6+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Unexpected results from CALL and AUTOCOMMIT=off
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox