pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC4 and setting statement_timeout: responds "is not yet implemented"
3+ messages / 2 participants
[nested] [flat]

* JDBC4 and setting statement_timeout: responds "is not yet implemented"
@ 2018-03-05 11:27 Gunnar Halvorsen <gunnarh@met.no>
  2018-03-05 23:36 ` Re: JDBC4 and setting statement_timeout: responds "is not yet implemented" rob stone <floriparob@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Gunnar Halvorsen @ 2018-03-05 11:27 UTC (permalink / raw)
  To: pgsql-general

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: JDBC4 and setting statement_timeout: responds "is not yet implemented"
  2018-03-05 11:27 JDBC4 and setting statement_timeout: responds "is not yet implemented" Gunnar Halvorsen <gunnarh@met.no>
@ 2018-03-05 23:36 ` rob stone <floriparob@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: rob stone @ 2018-03-05 23:36 UTC (permalink / raw)
  To: Gunnar Halvorsen <gunnarh@met.no>; pgsql-general

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: JDBC4 and setting statement_timeout: responds "is not yet implemented" => FIXED
@ 2018-03-07 11:26 Gunnar Halvorsen <gunnarh@met.no>
  0 siblings, 0 replies; 3+ messages in thread

From: Gunnar Halvorsen @ 2018-03-07 11:26 UTC (permalink / raw)
  To: rob stone <floriparob@gmail.com>; +Cc: pgsql-general

Dear Robert
The server is external and I'm not in able to upgrade the
PostgreSQL-server. Because of the age I was afraid for choosing a "new"
jdbc-driver. But I followed your suggestion to replace the jdbc4-driver
with last edition and it worked nice with the new driver
postgresql-42.2.1.jar.
Thanks a lot, Robert.

Have a nice day.

Regards
-Gunnar;)


2018-03-06 0:36 GMT+01:00 rob stone <floriparob@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
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-03-07 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 11:27 JDBC4 and setting statement_timeout: responds "is not yet implemented" Gunnar Halvorsen <gunnarh@met.no>
2018-03-05 23:36 ` rob stone <floriparob@gmail.com>
2018-03-07 11:26 Re: JDBC4 and setting statement_timeout: responds "is not yet implemented" => FIXED Gunnar Halvorsen <gunnarh@met.no>

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