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 ade05daf-5348-47b6-8633-ac58b055692c@s50g2000hsb.googlegroups.com
обсуждение исходный текст
Ответ на BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver  ("Amit Mujawar" <amit.mujawar@gmail.com>)
Ответы Re: Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver  (Kris Jurka <books@ejurka.com>)
Список pgsql-bugs
On Apr 22, 5:53=A0pm, bo...@ejurka.com (Kris Jurka) wrote:
> On Tue, 22 Apr 2008, Amit Mujawar wrote:
>
> > The following bug has been logged online:
>
> > Bug reference: =A0 =A0 =A04123
> > PostgreSQL version: 8.1
> > Description: =A0 =A0 =A0 =A0Statement.setQueryTimeout does not work wit=
h Postgres
> > Java Driver
> > Details:
>
> > I am using PostgreSQL through JDBC
> > PostgreSQL =96 8.1, Driver - org.postgresql.Driver 8.1-408.jdbc3
>
> > I suspect there is a problem with JDBC driver implementation for
> > setQueryTimeout API.
>
> setQueryTimeout is not implemented at all. =A0Newer drivers (8.3+) will
> throw an exception telling you that if you try to call setQueryTimeout
> while older drivers silently accept the value and do nothing.
>
> 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- Hide quoted text -
>
> - Show quoted text -

Hi Kris,

wanted to ask you that all the time, but never had found time to do
that.

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();

With best regards,

-- Valentine Gogichashvili

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

Предыдущее
От: valgog
Дата:
Сообщение: Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: BUG #4124: Error message: "You local administrators group contains 'Service users' this is a common configurat