Re: How do I use the backend APIs - Mailing list pgsql-general

From Tom Lane
Subject Re: How do I use the backend APIs
Date
Msg-id 22883.1140712781@sss.pgh.pa.us
Whole thread Raw
In response to Re: How do I use the backend APIs  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Feb 21, 2006 at 02:41:13AM -0800, Chad wrote:
>> -When rows change in between opening the cursor and fetching the
>> changed rows, will the FETCH retrieve the new data or is a snapshot
>> taken when the cursor is declared ?

> Standard visibility rules apply. READ COMMITTED shows anything
> committed, even after you've started. SERIALIZABLE gives you a
> consistant snapshot.

I believe that a cursor always shows a snapshot --- whether the
transaction is READ COMMITTED or SERIALIZABLE only affects whether
the snapshot is current as of the DECLARE CURSOR command or the
transaction's BEGIN command.  In either case you won't see changes
occurring after the cursor is opened.

            regards, tom lane

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: How to specify infinity for intervals ?
Next
From: Richard Huxton
Date:
Subject: Re: Cannot load number rows