Re: any way for a transaction to "see" inserts done earlier in the transaction? - Mailing list pgsql-general

From Susan Cassidy
Subject Re: any way for a transaction to "see" inserts done earlier in the transaction?
Date
Msg-id CAE3Q8o=m5yn+idoRgraXOnKuVz+EFNDbbjBf0vh-mcsEPCcWSg@mail.gmail.com
Whole thread Raw
In response to Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
List pgsql-general
It isn't marked as one of those as all, so whatever the default is.

That could be it.  I'll look up the default.

Thanks,
Susan


On Wed, Apr 16, 2014 at 5:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:
> It is a fairly large and complex Perl program, so no, not really.
> I do an insert via a function, which returns the new id, then later I try
> to SELECT on that id, and it doesn't find it.

> Could it be because the insert is done inside a function?

Is the SELECT also inside a database function, and if so is that function
marked stable or immutable?  That might explain it --- non-volatile
functions are intentionally designed not to notice updates that happen
after they start.

                        regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: any way for a transaction to "see" inserts done earlier in the transaction?
Next
From: Susan Cassidy
Date:
Subject: Re: any way for a transaction to "see" inserts done earlier in the transaction?