pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
5+ messages / 3 participants
[nested] [flat]
* Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
@ 2001-02-12 23:16 Hiroshi Inoue <Inoue@tpf.co.jp>
0 siblings, 0 replies; 5+ messages in thread
From: Hiroshi Inoue @ 2001-02-12 23:16 UTC (permalink / raw)
To: Steve Wranovsky <stevew@merge.com>; +Cc: pgsql-interfaces; pgsql-odbc@postgresql.org
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 ?
Regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
@ 2001-02-13 08:24 Dave Page <dpage@vale-housing.co.uk>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Page @ 2001-02-13 08:24 UTC (permalink / raw)
To: 'Hiroshi Inoue' <Inoue@tpf.co.jp>; Steve Wranovsky <stevew@merge.com>; +Cc: pgsql-interfaces; pgsql-odbc@postgresql.org
> -----Original Message-----
> From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp]
> Sent: 12 February 2001 23:17
> To: Steve Wranovsky
> Cc: pgsql-interfaces@postgresql.org; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] RE: [INTERFACES] 7.1 beta 3 Linux ODBC
> BEGINBehaviour
>
>
> 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...
Regards,
Dave.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
@ 2001-02-13 10:47 Hiroshi Inoue <Inoue@tpf.co.jp>
parent: Dave Page <dpage@vale-housing.co.uk>
0 siblings, 0 replies; 5+ messages in thread
From: Hiroshi Inoue @ 2001-02-13 10:47 UTC (permalink / raw)
To: Dave Page <dpage@vale-housing.co.uk>; +Cc: Steve Wranovsky <stevew@merge.com>; pgsql-interfaces; pgsql-odbc@postgresql.org
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
@ 2001-02-13 11:09 Dave Page <dpage@vale-housing.co.uk>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Page @ 2001-02-13 11:09 UTC (permalink / raw)
To: 'Hiroshi Inoue' <Inoue@tpf.co.jp>; +Cc: Steve Wranovsky <stevew@merge.com>; pgsql-interfaces; pgsql-odbc@postgresql.org
> -----Original Message-----
> From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp]
> Sent: 13 February 2001 10:47
> To: Dave Page
> Cc: Steve Wranovsky; pgsql-interfaces@postgresql.org;
> pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] RE: [INTERFACES] 7.1 beta 3 Linux ODBC
> BEGINBehaviour
>
>
> 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.
>
Ahh, I see. I suffered this problem with pgAdmin - it's not just VACUUM that
is affected. CREATE/ALTER/DROP USER/DATABASE are also affected, and maybe
other queries as well. I did raise this some time ago and got no response
other than the ODBC driver (and other affected interfaces) should *not* be
changed to stop wrapping such queries in a transaction, rather the
restriction that was added to PostgreSQL 7.0 to throw the error should be
removed. I did exchange email with Thomas Lockhart who was keen to fix the
problem and considered it a 'release stopper'. I know that some causes of
the error message were removed, but don't know if he got them all.
Incidently, pgAdmin gets round the problem by prepending a space to affected
queries! It seems that postgresql will error with "VACUUM" but not "
VACUUM". Odd....
Regards,
Dave.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
@ 2001-02-13 14:58 Tom Lane <tgl@sss.pgh.pa.us>
parent: Dave Page <dpage@vale-housing.co.uk>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2001-02-13 14:58 UTC (permalink / raw)
To: Dave Page <dpage@vale-housing.co.uk>; +Cc: 'Hiroshi Inoue' <Inoue@tpf.co.jp>; Steve Wranovsky <stevew@merge.com>; pgsql-interfaces; pgsql-odbc@postgresql.org
Dave Page <dpage@vale-housing.co.uk> writes:
> Incidently, pgAdmin gets round the problem by prepending a space to affected
> queries! It seems that postgresql will error with "VACUUM" but not "
> VACUUM". Odd....
Postgres itself doesn't care. However, up till a day or two ago the
ODBC driver would change its behavior depending on leading spaces.
You will probably find that the above-quoted hack no longer works
with the current-CVS ODBC driver ...
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2001-02-13 14:58 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-12 23:16 Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour Hiroshi Inoue <Inoue@tpf.co.jp>
2001-02-13 08:24 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour Dave Page <dpage@vale-housing.co.uk>
2001-02-13 10:47 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2001-02-13 11:09 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour Dave Page <dpage@vale-housing.co.uk>
2001-02-13 14:58 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox