X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 19735475A4B for ; Sun, 30 Mar 2003 19:36:49 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 7968847580B for ; Sun, 30 Mar 2003 19:36:47 -0500 (EST) Received: (qmail 15072 invoked from network); 31 Mar 2003 00:36:49 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 31 Mar 2003 00:36:49 -0000 Received: from tpf.co.jp (3d_note1 [126.0.1.61]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id JAA11997; Mon, 31 Mar 2003 09:36:42 +0900 (JST) Message-ID: <3E878E62.46BEECEE@tpf.co.jp> Date: Mon, 31 Mar 2003 09:40:02 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Tom Lane Cc: Peter Eisentraut , Bruce Momjian , Neil Conway , PostgreSQL Hackers Subject: Re: updateable cursors & visibility References: <6191.1049056370@sss.pgh.pa.us> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-28.5 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/1197 X-Sequence-Number: 37443 Tom Lane wrote: > > Peter Eisentraut 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/