Re: Is setQuerySnapshot called for embedded plpgsql function calls? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Is setQuerySnapshot called for embedded plpgsql function calls?
Date
Msg-id 14454.1170387607@sss.pgh.pa.us
Whole thread Raw
In response to Is setQuerySnapshot called for embedded plpgsql function calls?  ("Burak Seydioglu" <buraks78@gmail.com>)
List pgsql-novice
"Burak Seydioglu" <buraks78@gmail.com> writes:
> For some reason, the consecutive second_func() calls do not see the
> newly inserted data. So the total for the next second_func() call
> always remains zero. Please see the code below.

> Is this because setQuerySnapshot() is not called for embedded plpgsql
> functions but only for the first_function() call?

For operations within a single transaction, what counts is
CommandCounterIncrement not SetQuerySnapshot.

> I am runnging 7.4 btw.

I believe we changed the rules for this in 8.0 ... can you upgrade?

            regards, tom lane

pgsql-novice by date:

Previous
From: "Burak Seydioglu"
Date:
Subject: Is setQuerySnapshot called for embedded plpgsql function calls?
Next
From: "Burak Seydioglu"
Date:
Subject: Re: Is setQuerySnapshot called for embedded plpgsql function calls?