Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: Steve Wranovsky <stevew(at)merge(dot)com>, pgsql-interfaces(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
Date: 2001-02-13 10:47:23
Message-ID: 3A8910BB.BE3BFDDC@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-odbc

Dave Page wrote:
>
> >
> > Steve Wranovsky wrote:
> > >
> > > >>
> > > >> 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 ?
> > >
> > > I now agree with point 1 above, but for point 2, I believe
> > you should
> > > force the user to issue a COMMIT if a transaction is in progress
> > > when they try a VACUUM ANALYZE.
> >
> > I've been waiting for reply.
> > I see. It's the simplest change. But you seem to have to
> > change your existent your code. Or you may have to distinguish
> > your code according to PG servers. Is it OK ?
>
> I've not really been following this thread, but changing code or writing
> server version dependant code sounds very bad to me. Certainly in my case I
> have enough issues as it is keeping pgAdmin working with the current and
> previous release...
>

Sorry my explanation was wrong. The version is of driver not
of server. I'm confirming him in his inconvenience.

In the previous release(6.5.???) in autocommit off mode
Steve's query sequence e.g.
select ...
vacuum ...
was successful because neither "select" nor "vacuum"
issued "BEGIN".

In 7.01.0001
select ...
issues "BEGIN" and subsequent
vacuum ...
fails because "vacuum" isn't allowed to be called inside
a transaction block. Even though he inserts
commit
after "select", "vacuum" itself issues "BEGIN" and fails.

This change is really inconvenient for Steve.
My point 1) is to suppress "BEGIN" by "vacuum" itself. Then
select ...
commit
vacuum ...
would be successful but he would have to insert "commit"
into his current query sequence. My point 2) is to issue
"commit" automatically before "vacuum" so that he doesn't
have to change his query sequence.

Regards,
Hiroshi Inoue

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dave Page 2001-02-13 11:09:53 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
Previous Message Peter T Mount 2001-02-13 10:02:45 Re: [INTERFACES] jdbc fastpath error & Z error (URGENT NEED!!!)

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2001-02-13 11:09:53 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
Previous Message Dave Page 2001-02-13 08:24:09 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour