Connection Time

Поиск
Список
Период
Сортировка
От Martin Jung
Тема Connection Time
Дата
Msg-id 200401061819.48933.martin.jung@gmx.de
обсуждение исходный текст
Ответы Re: Connection Time
Список pgsql-jdbc
Hi,

using postgres for a long time I noticed an incompatibility after an upgrade
to a newer version of java.
I wrote a small test class (test.java, see attachment) to try my local
database installation.
This is what I got using the latest jdk:
jung@daherrim:~/tmp/test> java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
jung@daherrim:~/tmp/test> time java -cp .:/usr/share/pgsql/pg73b1jdbc3.jar
Test
Exception in thread "main" java.sql.SQLException: ERROR:  Relation 'test'
already exists

        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:126)
        at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:451)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:281)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:200)
        at Test.main(Test.java:7)

real    3m9.731s
user    0m0.654s
sys     0m0.045s

This is what I get using an older jdk version:
jung@daherrim:~/tmp/test> java -version
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
jung@daherrim:~/tmp/test> time java -cp .:/usr/share/pgsql/pg73b1jdbc3.jar
Test
Exception in thread "main" java.sql.SQLException: ERROR:  Relation 'test'
already exists

        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:126)
        at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:451)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:281)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:200)
        at Test.main(Test.java:7)

real    0m0.522s
user    0m0.387s
sys     0m0.066s

The version of pgsql is:
jung@daherrim:~/tmp/test> psql --version
psql (PostgreSQL) 7.3.4

Operating system is SuSE Linux 9.0 on an i568 machine.
Is this a known problem? Can I solve this by using some upgrade? I would like
to continue using postgres, but I and my customers need the latest version of
java. The three minute delay in connecting is hardly tolerable.

Thank you for your answer.

Sincereley,
Martin Jung

--
Martin Jung
Bussardstrasse 44, 91088 Bubenreuth
Tel. : +49-9131-932166
Fax. : +49-9131-828699
PGP public key ID: 0x3F2D0402. http://www.keyserver.net


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Karlmeier, Volker"
Дата:
Сообщение: setFetchSize
Следующее
От: Xavier Bugaud
Дата:
Сообщение: Nmber of rows in a ResultSet