Received: from gauss.deltav.hu (deltav.hu [213.163.0.2]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1AIFjx74816 for ; Sat, 10 Feb 2001 13:15:45 -0500 (EST) (envelope-from ltibor@mail.tiszanet.hu) Received: from pcltibor (eko-gw.ekopark.hu [213.163.10.100]) by gauss.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAA692E for ; Sat, 10 Feb 2001 19:19:15 +0100 From: =?iso-8859-2?B?TOFzemzzIFRpYm9y?= To: "pgsql-odbc" Subject: RE: [INTERFACES] 7.1 beta 3 Linux ODBC BEGIN Behaviour Date: Sat, 10 Feb 2001 19:15:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <3976.981826245@sss.pgh.pa.us> X-Archive-Number: 200102/53 X-Sequence-Number: 127 > It'd be nice if ODBC could distinguish SELECT FOR UPDATE from plain > SELECT, but in practice it cannot reliably do so. Doubtless we could > extend ODBC to look for "FOR UPDATE" in the text of the query, but > that will only catch simple situations. Consider these possibilities: > > * A view or rule invoked by the query uses FOR UPDATE. (Pre-7.1, we > didn't support FOR UPDATE in views ... but we do now.) > > * A function invoked by the query does SELECT FOR UPDATE internally. > > For that matter, it's quite possible for a function invoked by a SELECT > to do INSERT/UPDATE/DELETE internally. Therefore, it's impossible for > the ODBC driver to reliably distinguish a pure SELECT from a SELECT that > causes locking or even data updates. > > Given these considerations, I think it's a mistake for ODBC to treat > SELECT differently from other queries for the purpose of setting > transaction boundaries. > > regards, tom lane Thank you Tom. I agree. Regards, Tibor Tibor Laszlo ltibor@mail.tiszanet.hu