pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: updateable cursors & visibility
Date: Mon, 31 Mar 2003 09:40:02 +0900
Message-ID: <3E878E62.46BEECEE@tpf.co.jp> (raw)
References: <Pine.LNX.4.44.0303291259210.2289-100000@peter.localdomain>
	<6191.1049056370@sss.pgh.pa.us>

Tom Lane wrote:
> 
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Hiroshi Inoue writes:
> >> Must a SENSITIVE cursor see other applications' changes made
> >> while the cursor is open ?
> > Yes.  It is immaterial whether the change came from a different
> > application or the same one.
> > Nevertheless, the cursor sensitivity does not excuse you from observing
> > the transaction isolation level.  So even if the cursor is sensitive you
> > should not be able to see other transactions' changes if you are in a
> > serializable transaction.
> 
> Serializable or not, there is a good case for saying that cursors don't
> see changes made after they are opened, period.  The current
> implementation locks down the cursor's snapshot at DECLARE time. 

It's only because PostgreSQL( or other MVCC based DBMS) is
easy and natural to implement cursors in such a way. However,
It isn't a requirement of the SQL standard, IIRC.

As for ODBC, ODBC has the following cursor types about the
visibility of other changes.
1) static
   It never detects other changes.
2) dynamic
   It can detect any changes made to the membership, order,
   and values of the result set after the cursor is opened.
3) keyset-driven
   It always detects changes to the values of rows.
4) mixed
   A combination of a keyset-driven cursor and a dynamic
   cursor.   

It's not clear to me now how we should realize the above
type of cursors at server side.

regards,
Hiroshi Inoue
	http://www.geocities.jp/inocchichichi/psqlodbc/




view thread (34+ messages)  latest in thread

Message-ID: <3E878E62.46BEECEE@tpf.co.jp>
Permalink:  ../3E878E62.46BEECEE@tpf.co.jp/
Also on:    postgresql.org/message-id/3E878E62.46BEECEE@tpf.co.jp

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, peter_e@gmx.net, pgman@candle.pha.pa.us, neilc@samurai.com
  Subject: Re: updateable cursors & visibility
  In-Reply-To: <3E878E62.46BEECEE@tpf.co.jp>
  References: <Pine.LNX.4.44.0303291259210.2289-100000@peter.localdomain> <6191.1049056370@sss.pgh.pa.us> <3E878E62.46BEECEE@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox