Home > Archive > PostgreSQL JDBC > February 2006 > SET AUTOCOMMIT TO OFF no longer supported









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SET AUTOCOMMIT TO OFF no longer supported
Carlos Correia

2006-02-04, 1:23 pm

-----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

iD8DBQFD5PWm90uzwjA1
SJURAoc1AKCE74cLioWc
MAjtlzyXrVRzFm3hNACe
ObH4
DeUGTirho+sX3SjHHVzH
6Xk=
=XItf
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Tom Lane

2006-02-04, 1:23 pm

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Carlos Correia

2006-02-04, 1:23 pm

-----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...-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

iD8DBQFD5P1E90uzwjA1
SJURAmpQAKC17SNnH6L4
ozK+tHWHyL+TCJZvHgCe
PC4H
/ CuB8r19k55AEJlPe3bfK
O8=
=WHzD
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Tom Lane

2006-02-04, 8:24 pm

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...-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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Carlos Correia

2006-02-04, 8:24 pm

-----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...-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

iD8DBQFD5QMA90uzwjA1
SJURApVWAJ9g79029OfZ
ju1u56uxCLvPAQC5LgCf
ZWch
+caTxqN/Z5L/8bUGONlLR0w=
=Lokx
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Kris Jurka

2006-02-04, 8:24 pm



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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Carlos Correia

2006-02-04, 8:24 pm

-----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

iD8DBQFD5TvY90uzwjA1
SJURAgv9AJ9ZUE1Z4SkY
Hd6FCTJR5pTYcmuKgQCa
An+C
bTTh6XIexAx8UdwOJd3t
HGg=
=uaJb
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com