Thread: SET AUTOCOMMIT TO OFF no longer supported

SET AUTOCOMMIT TO OFF no longer supported

From
Carlos Correia
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm trying to run a Java application that gets the error in the subject
when I run it in Windows 2000 with both versions (8.0 and 8.1) of
Postgres, when I try to start a transaction.

The same app works fine in Linux with Postgres 7.4...

Any hints?

thanks,

Carlos
- --
MEMÓRIA PERSISTENTE, Lda.
Tel.: 219 291 591 - GSM:  967 511 762
e-mail: geral@m16e.com - URL: http://www.m16e.com
AIM: m16e - ICQ: 257488263 - Jabber: m16e@amessage.de
Skype.com username (VoIP): m16e.com
GnuPG: wwwkeys.eu.pgp.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD5PWm90uzwjA1SJURAoc1AKCE74cLioWcMAjtlzyXrVRzFm3hNACeObH4
DeUGTirho+sX3SjHHVzH6Xk=
=XItf
-----END PGP SIGNATURE-----

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Tom Lane
Date:
Carlos Correia <carlos@m16e.com> writes:
> I'm trying to run a Java application that gets the error in the subject
> when I run it in Windows 2000 with both versions (8.0 and 8.1) of
> Postgres, when I try to start a transaction.

I think you need a newer JDBC driver.  (If the app itself, rather than
the driver, is trying to issue this command then the app is so broken
it doesn't deserve to live.)

> The same app works fine in Linux with Postgres 7.4...

It might have worked with 7.3, but 7.4 would give this same error message.

            regards, tom lane

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Carlos Correia
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Lane escreveu:
| Carlos Correia <carlos@m16e.com> writes:
|
|>I'm trying to run a Java application that gets the error in the subject
|>when I run it in Windows 2000 with both versions (8.0 and 8.1) of
|>Postgres, when I try to start a transaction.
|
|
| I think you need a newer JDBC driver.  (If the app itself, rather than
| the driver, is trying to issue this command then the app is so broken
| it doesn't deserve to live.)
|

newer then this:
http://jdbc.postgresql.org/download/postgresql-8.1-404.jdbc3.jar?

|
|>The same app works fine in Linux with Postgres 7.4...
|
|
| It might have worked with 7.3, but 7.4 would give this same error message.
|

Well, as I said before, it's been working perfectly from several years
with 7.4.

Thanks anyway,

Carlos
- --
MEMÓRIA PERSISTENTE, Lda.
Tel.: 219 291 591 - GSM:  967 511 762
e-mail: geral@m16e.com - URL: http://www.m16e.com
AIM: m16e - ICQ: 257488263 - Jabber: m16e@amessage.de
Skype.com username (VoIP): m16e.com
GnuPG: wwwkeys.eu.pgp.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD5P1E90uzwjA1SJURAmpQAKC17SNnH6L4ozK+tHWHyL+TCJZvHgCePC4H
/CuB8r19k55AEJlPe3bfKO8=
=WHzD
-----END PGP SIGNATURE-----

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Tom Lane
Date:
Carlos Correia <carlos@m16e.com> writes:
> Tom Lane escreveu:
> | I think you need a newer JDBC driver.  (If the app itself, rather than
> | the driver, is trying to issue this command then the app is so broken
> | it doesn't deserve to live.)

> newer then this:
> http://jdbc.postgresql.org/download/postgresql-8.1-404.jdbc3.jar?

No, that driver is plenty new enough to know not to do this.  It's the
app that's broken, then --- it has no business messing with SET
AUTOCOMMIT rather than using the JDBC-spec methods to control
transaction boundaries.

> | It might have worked with 7.3, but 7.4 would give this same error message.

> Well, as I said before, it's been working perfectly from several years
> with 7.4.

Interesting.  Maybe the app is coded to use SET AUTOCOMMIT only with 7.3
(which is the *only* PG release series that ever had this command),
but its version test is broken so that it tries to use it with 8.*?

            regards, tom lane

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Carlos Correia
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Lane escreveu:
| Carlos Correia <carlos@m16e.com> writes:
|
|>Tom Lane escreveu:
|>| I think you need a newer JDBC driver.  (If the app itself, rather than
|>| the driver, is trying to issue this command then the app is so broken
|>| it doesn't deserve to live.)
|
|
|>newer then this:
|>http://jdbc.postgresql.org/download/postgresql-8.1-404.jdbc3.jar?
|
|
| No, that driver is plenty new enough to know not to do this.  It's the
| app that's broken, then --- it has no business messing with SET
| AUTOCOMMIT rather than using the JDBC-spec methods to control
| transaction boundaries.
|
|

I'm using Connection's setAutocommit() method and not execQuery( "set
autocommit off" )... note that this only happens in Windows2000, not in
Linux.

regards,

Carlos
- --
MEMÓRIA PERSISTENTE, Lda.
Tel.: 219 291 591 - GSM:  967 511 762
e-mail: geral@m16e.com - URL: http://www.m16e.com
AIM: m16e - ICQ: 257488263 - Jabber: m16e@amessage.de
Skype.com username (VoIP): m16e.com
GnuPG: wwwkeys.eu.pgp.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD5QMA90uzwjA1SJURApVWAJ9g79029OfZju1u56uxCLvPAQC5LgCfZWch
+caTxqN/Z5L/8bUGONlLR0w=
=Lokx
-----END PGP SIGNATURE-----

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Kris Jurka
Date:

On Sat, 4 Feb 2006, Carlos Correia wrote:

> I'm using Connection's setAutocommit() method and not execQuery( "set
> autocommit off" )... note that this only happens in Windows2000, not in
> Linux.
>

Check your classpath.  I'd bet you've got two versions of the driver in
there.  Try adding this line somewhere in your app.

org.postgresql.util.PSQLDriverVersion.main(null);

It will print where it finds the driver on stdout.

Kris Jurka

Re: SET AUTOCOMMIT TO OFF no longer supported

From
Carlos Correia
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kris Jurka escreveu:
|
|
| On Sat, 4 Feb 2006, Carlos Correia wrote:
|
|> I'm using Connection's setAutocommit() method and not execQuery( "set
|> autocommit off" )... note that this only happens in Windows2000, not in
|> Linux.
|>
|
| Check your classpath.  I'd bet you've got two versions of the driver in
| there.  Try adding this line somewhere in your app.
|
| org.postgresql.util.PSQLDriverVersion.main(null);
|
| It will print where it finds the driver on stdout.
|

YOU'RE RIGHT :-D


Some years ago I had the same problem: there was an old pg jar file in
JAVA_HOME/lib/ext dir... you have pointed it out then, as you did now :-D

THANK YOU VERY MUCH!!! and my appologies for asking the same question
twice -- thought with different versions.

I LOVE POSTGRES :-D

Carlos
- --
MEMÓRIA PERSISTENTE, Lda.
Tel.: 219 291 591 - GSM:  967 511 762
e-mail: geral@m16e.com - URL: http://www.m16e.com
AIM: m16e - ICQ: 257488263 - Jabber: m16e@amessage.de
Skype.com username (VoIP): m16e.com
GnuPG: wwwkeys.eu.pgp.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD5TvY90uzwjA1SJURAgv9AJ9ZUE1Z4SkYHd6FCTJR5pTYcmuKgQCaAn+C
bTTh6XIexAx8UdwOJd3tHGg=
=uaJb
-----END PGP SIGNATURE-----