From: rob stone <floriparob@gmail.com>
To: Gunnar Halvorsen <gunnarh@met.no>
To: pgsql-general@postgresql.org
Subject: Re: JDBC4 and setting statement_timeout: responds "is not yet implemented"
Date: Tue, 06 Mar 2018 10:36:27 +1100
Message-ID: <1520292987.2265.6.camel@gmail.com> (raw)
In-Reply-To: <CAJ=_JQ2zjDWNk+f_jff7WTZc2zLQJ1WsMhj3KX_d45Zf=--mXA@mail.gmail.com>
References: <CAJ=_JQ2zjDWNk+f_jff7WTZc2zLQJ1WsMhj3KX_d45Zf=--mXA@mail.gmail.com>
Hi Gunnar,
On Mon, 2018-03-05 at 12:27 +0100, Gunnar Halvorsen wrote:
> Dear Sirs,
> As quite new in this discussiongroup I have red a lot about
> statement_timeout, but I can't find any answer on the following
> problem:
>
> My JavaEE-code responds the fpllowing Error message:
>
> Method
> org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is
> not yet implemented
>
> Javacode:
> PreparedStatement AA = null;
> ..
> ..
> AA.setQueryTimeout( 5000 ); // This sentence generates the fault-
> message
>
>
> PostgreSQL version: 9.1.24
> ( Only READ-access )
>
> JDBC4 version: postgresql-9.0-801.jdbc4.jar
>
>
> My application reads contiously a SELECT-sentence every 10 seconds,
> and needs to be aborted if it not returns in during of 5 seconds.
>
> Is the functiion setQueryTimeout(INT) not yet implemented in JDBC4,
> or is it the PostgreSQK-server which is not yet implemented?
>
> How shall I implement statement_timeout in my JavaEE code, when I
> only has Read-access to PostgreSQL, to avoid this ErrorMessage?
>
> Regards
> -Gunnar
>
>
>
>
>
There was a fix to this in Version 9.4-1205 of the driver.
Also, your version of PostgreSql is ancient.
I think an upgrade would be worthwhile.
HTH,
Robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: floriparob@gmail.com, gunnarh@met.no
Subject: Re: JDBC4 and setting statement_timeout: responds "is not yet implemented"
In-Reply-To: <1520292987.2265.6.camel@gmail.com>
References: <CAJ=_JQ2zjDWNk+f_jff7WTZc2zLQJ1WsMhj3KX_d45Zf=--mXA@mail.gmail.com> <1520292987.2265.6.camel@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox