Skip site navigation (1) Skip section navigation (2)

RE: 7.1 beta 3 Linux ODBC BEGIN Behaviour

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hiroki Kataoka" <kataoka(at)interwiz(dot)koganei(dot)tokyo(dot)jp>, <pgsql-interfaces(at)postgresql(dot)org>, <pgsql-odbc(at)postgresql(dot)org>, "Steve Wranovsky" <stevew(at)merge(dot)com>
Subject: RE: 7.1 beta 3 Linux ODBC BEGIN Behaviour
Date: 2001-02-10 21:37:02
Message-ID: EKEJJICOHDIEMGPNIFIJCEBDDJAA.Inoue@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-odbc
> -----Original Message-----
> From: Tom Lane
> 
> 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.
>

OK, agreed. 
However simply putting back the behabior make it impossible to call
VACUUM in psqlodbc autocommit off mode.

My idea is as follows.
 [In autocommit off mode]
 1) All statements except STMT_TYPE_OTHER issue
     "BEGIN" if a trasaction isn't in progress.
 2) STMT_TYPE_OTHER statements automatically issue
    "COMMIT" if a transaction is progress.

Comments ?

Regards,
Hiroshi Inoue

In response to

Responses

pgsql-odbc by date

Next:From: Bruce MomjianDate: 2001-02-10 21:38:03
Subject: Re: RE: [PATCHES] Re: [HACKERS] 6.2 protocol
Previous:From: Hiroshi InoueDate: 2001-02-10 21:36:40
Subject: RE: RE: [PATCHES] Re: [HACKERS] 6.2 protocol

pgsql-interfaces by date

Next:From: Tatsuo IshiiDate: 2001-02-11 04:27:38
Subject: Re: pgAccess fails to launch on HPUX
Previous:From: László TiborDate: 2001-02-10 18:15:56
Subject: RE: [INTERFACES] 7.1 beta 3 Linux ODBC BEGIN Behaviour

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group