Re: problem with new autocommit config parameter and jdbc

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: snpe <snpe(at)snpe(dot)co(dot)yu>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: problem with new autocommit config parameter and jdbc
Date: 2002-09-11 01:44:39
Message-ID: Pine.NEB.4.44.0209111041500.23252-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Tue, 10 Sep 2002, Tom Lane wrote:

> As of CVS tip, SET commands *do* initiate transactions
> if you have autocommit off. By your reading of Date, this is not
> spec compliant for certain SET variables: a SET not already within
> a transaction should not start a transaction block, at least for the
> variables mentioned above. It occurs to me that it'd be reasonable
> to make it act that way for all SET variables.

I agree. SET variables are normally related to the behaviour of a
session, not information stored in the database. And your autocommit
example shows why having them start a transaction is a problem.

But there were some issues with rolling back and SET commands,
weren't there? I remember a long discussion about this that I'm
not sure I want to go back to. :-)

> > Nor, of course, are the nonexecutable statements DECLARE CURSOR,
> > DECLAR LOCAL TEMPORARY TABLE, BEGIN DECLARE SECTION, SEND DECLARE
> > SECTIONS, and WHENEVER.
>
> Hmm. I think the spec's notion of DECLARE must be different from ours.
> Our implementation of DECLARE CURSOR both declares and opens the cursor,
> and as such it *must* be transaction-initiating; else it's useless.

Well, I'm not going to go chase it down right now, but ISTR that
DECLAREing a cursor just allocates a variable name or the storage for it
or something like that; it doesn't actually create an active cursor.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-09-11 01:51:41 Re: Script to compute random page cost
Previous Message Curt Sampson 2002-09-11 01:31:06 Re: Optimization levels when compiling PostgreSQL...

Browse pgsql-jdbc by date

  From Date Subject
Next Message Curt Sampson 2002-09-11 01:53:09 Re: [JDBC] problem with new autocommit config parameter
Previous Message Stephan Szabo 2002-09-11 01:14:22 Re: problem with new autocommit config parameter and jdbc