Unix Technical Forum

SET AUTOCOMMIT TO OFF no longer supported

This is a discussion on SET AUTOCOMMIT TO OFF no longer supported within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to run a Java application that gets the error in ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:54 PM
Carlos Correia
 
Posts: n/a
Default SET AUTOCOMMIT TO OFF no longer supported

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

iD8DBQFD5PWm90uzwjA1SJURAoc1AKCE74cLioWcMAjtlzyXrV RzFm3hNACeObH4
DeUGTirho+sX3SjHHVzH6Xk=
=XItf
-----END PGP SIGNATURE-----

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 11:54 PM
Tom Lane
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 11:54 PM
Carlos Correia
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported

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

iD8DBQFD5P1E90uzwjA1SJURAmpQAKC17SNnH6L4ozK+tHWHyL +TCJZvHgCePC4H
/CuB8r19k55AEJlPe3bfKO8=
=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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 11:54 PM
Tom Lane
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 11:55 PM
Carlos Correia
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported

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

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

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-15-2008, 11:55 PM
Kris Jurka
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-15-2008, 11:55 PM
Carlos Correia
 
Posts: n/a
Default Re: SET AUTOCOMMIT TO OFF no longer supported

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

iD8DBQFD5TvY90uzwjA1SJURAgv9AJ9ZUE1Z4SkYHd6FCTJR5p TYcmuKgQCaAn+C
bTTh6XIexAx8UdwOJd3tHGg=
=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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com