"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