X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2668647580B for ; Thu, 27 Mar 2003 22:37:15 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id BC5BD474E44 for ; Thu, 27 Mar 2003 22:37:13 -0500 (EST) Received: (qmail 31055 invoked from network); 28 Mar 2003 03:37:17 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 28 Mar 2003 03:37:17 -0000 Received: from tpf.co.jp ([126.0.1.70]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id MAA10367; Fri, 28 Mar 2003 12:37:17 +0900 (JST) Message-ID: <3E83C430.3C99EC9D@tpf.co.jp> Date: Fri, 28 Mar 2003 12:40:32 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Bruce Momjian , Peter Eisentraut Cc: Neil Conway , PostgreSQL Hackers Subject: Re: updateable cursors & visibility References: <200303271532.h2RFWnV15938@candle.pha.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/1142 X-Sequence-Number: 37388 Bruce Momjian wrote: > > Peter Eisentraut wrote: > > Bruce Momjian writes: > > > > > One idea is to require FOR UPDATE on the cursor --- while that prevents > > > other transactions from changing the cursor, it doesn't deal with the > > > current transaction modifying the table outside the cursor. > > > > That would only keep existing rows from being deleted but not new rows > > from being added. > > > > > One idea is > > > to have UPDATE/DELETE WHERE CURRENT OF behave like UPDATE/DELETE do now > > > when they find a row that is locked by another transaction --- they wait > > > to see if the transaction commits or aborts, then if committed they > > > follow the tid to the newly updated row, check the WHERE clause to see > > > if it still is satisfied, then perform the update. (Is this correct?) > > > > Surely it would have to do something like that, but that's a matter of the > > transaction isolation, not the sensitivity. It doesn't do anything to > > address the potential problems I mentioned. > > Well, a unique constraint on the row would see your other INSERT. I > don't see how making an INSERT visible in the cursor would help us, and > I don't see how we would implement that except by rerunning the query > for each fetch, which seems like a bad idea. I don't understand what you two are discussing. What's is SENSITIVE, INSENSITIVE or ASESNSITIVE ? regards, Hiroshi Inoue http://www.geocities.jp/inocchichichi/psqlodbc/