Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver

Поиск
Список
Период
Сортировка
От valgog
Тема Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver
Дата
Msg-id e9a628e9-fa81-44a8-a49b-7b9efc235875@s50g2000hsb.googlegroups.com
обсуждение исходный текст
Ответ на BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver  ("Amit Mujawar" <amit.mujawar@gmail.com>)
Ответы Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
Ok, understood... that could not be so easy anyway :) I supposed that
it should be something, that lays in the JDBC specs...

Regards,

-- Valentine

On Apr 24, 12:28=A0pm, bo...@ejurka.com (Kris Jurka) wrote:
> On Wed, 23 Apr 2008, valgog wrote:
> > Is it possible to implement the setStatementTimeout() as somethig
> > like:
>
> > s =3D c.prepareStatement("SELECT set_config('statement_timeout',
> > <neededTimeoutInMilliseconds>, false);" );
> > s.executeQuery();
> > c.commit();
>
> Not really. =A0This sets a global timeout for all queries while the JDBC =
API
> specifies that it is per-Statement. =A0Also this only protects against lo=
ng
> running queries. =A0Recently there was some discussion on the JDBC list
> about soft vs hard timeouts and it seemed the conclusion was that people
> wanted setQueryTimeout to protect against things like the network
> connection dropping that statement_timeout can't do.
>
> In many cases statement_timeout is an adequate substitute for
> setQueryTimeout, but not in the general case that the JDBC driver must
> implement.
>
> Kris Jurka
>
> --
> Sent via pgsql-bugs mailing list (pgsql-b...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/p=
gsql-bugs

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: problem
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver