From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Curt Sampson <cjs(at)cynic(dot)net>, 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: [JDBC] problem with new autocommit config parameter and |
Date: | 2002-09-10 20:00:26 |
Message-ID: | 200209102000.g8AK0Ql19988@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > That seems messy. What you are saying is that if autocommit is off,
> > then in:
>
> > SET x=1;
> > UPDATE ...
> > SET y=2;
> > ROLLBACK;
>
> > that the x=1 doesn't get rolled back bu the y=2 does?
>
> Yes, if you weren't in a transaction at the start.
>
> > I can't see any good logic for that.
>
> How about "the SQL spec requires it"? Date seems to think it does,
> at least for some variables (of course we have lots of variables
> that are not in the spec).
>
> I can't find anything very clear in the SQL92 or SQL99 documents,
> and I'm not at home at the moment to look at my copy of Date, but
> if Curt's reading is correct then we have spec precedent for acting
> this way.
Spec or not, it looks pretty weird so I would question following the
spec on this one.
Do we want to say "With autocommit off, SET will be in it's own
transaction if it appears before any non-SET command", and "SETs are
rolled back except if autocommit off and they appear before any
non-SET"?
I sure don't.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2002-09-10 20:40:07 | Re: ODBC problem/question |
Previous Message | Tom Lane | 2002-09-10 19:55:57 | Re: [JDBC] problem with new autocommit config parameter and jdbc |
From | Date | Subject | |
---|---|---|---|
Next Message | snpe | 2002-09-10 20:49:38 | Re: [JDBC] problem with new autocommit config parameter and jdbc |
Previous Message | Tom Lane | 2002-09-10 19:55:57 | Re: [JDBC] problem with new autocommit config parameter and jdbc |