Re: setQueryTimeOut(1) - not expected result...

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: setQueryTimeOut(1) - not expected result...
Дата
Msg-id 401827C6.7030003@opencloud.com
обсуждение исходный текст
Ответ на setQueryTimeOut(1) - not expected result...  (Guido Fiala <guido.fiala@dka-gmbh.de>)
Ответы Re: setQueryTimeOut(1) - not expected result...  (Guido Fiala <guido.fiala@dka-gmbh.de>)
Список pgsql-jdbc
Guido Fiala wrote:

> //user1:
>
> stmt.setQueryTimeout(1);//wait just one second
> ResultSet rs=stmt.executeQuery("BEGIN;SELECT * FROM mytable FOR UPDATE OF
> mytable");

[...]

> What am i doing wrong?

You are assuming that setQueryTimeout() is implemented :)  Calling it
does nothing in the current driver. This is on my list of things to fix,
but not near the top.

On another note, it's generally a bad idea to use the transaction
control primitives (BEGIN, COMMIT, ROLLBACK) directly -- use
Connection.setAutoCommit(false) and Connection.commit() /
Connection.rollback() instead.

-O

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

Предыдущее
От: "Waldomiro"
Дата:
Сообщение: Re: setQueryTimeOut(1) - not expected result...
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Connection problem