Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eszeo-0005Nx-Va for pgsql-general@arkaria.postgresql.org; Mon, 05 Mar 2018 23:36:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eszen-0008Ik-N4 for pgsql-general@arkaria.postgresql.org; Mon, 05 Mar 2018 23:36:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eszen-0008Ia-9i for pgsql-general@lists.postgresql.org; Mon, 05 Mar 2018 23:36:37 +0000 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eszek-0006Ma-Px for pgsql-general@postgresql.org; Mon, 05 Mar 2018 23:36:36 +0000 Received: by mail-pl0-x242.google.com with SMTP id 61-v6so10721061plf.3 for ; Mon, 05 Mar 2018 15:36:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:mime-version :content-transfer-encoding; bh=0aMuh4vgvza/HIWmnJwOQMyS7aiClyNkwFovDpIhXrk=; b=LX28fInPWnRNrBmPxMRvx5+NXu3q2e4PPwuWJvi1xmuHoUY0RBbYRUVnOuHjIIJv8j QxGo8NslNYthCt+U1YknHH1koO8uawP7QLgy7zSZ2Y+y7TV5vta3fRqUn/vNo9byM+Dp Esr5P5/vp6coj15YnVTyW/YJwHPSrlwQ3Qjgu7/kwBbQoBtPNZnSy/HLfCLb/rFfJYc1 D3FvyAMojYi8+KlE+l9vvnSbvSaYnw1faadguhNyd4dK972+MDe62fhYSE5poEqAqhMD jxdIK0IIrfj6vwVkSsZNEXZRVclLMMtyjsE53OtyqrWZrjbHWvyzQe1JPaQBGxfEN+ew bHWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=0aMuh4vgvza/HIWmnJwOQMyS7aiClyNkwFovDpIhXrk=; b=GtUZ6Wu4Hz+ccminMEhV4nlANwFexn8uiX26LJKI0MMU711vEy8IGFWy2XE+bZH2fl HZe5JNin8WoxyjOSkO6ScsZenE9U9nzNlh+pgManR6o9ghTefzZISUvz+ql4fPNR2ftJ EkqilubCCnvTujl1mMDoy2Ih7fA2f6PwC8+mLi+uOs+UVWSqjgp0KDc6wgwFdOcO2jUo zdQiwZdGzYyqAM/eKvq+F8OFJ3mNPLOKo0sb95DMggRaD6GiftNIkPETlLID//XpuPFN gsq05pUlpDeUKSjukM/gm6XQG5pD7sClge/hmGD5DwLG9fwlEgs9qCZ9Cvx5wQ5vGnRr fq1A== X-Gm-Message-State: APf1xPCzv7sHUJjPgJclfOH/avbAVnT0URAhtOz6VD1c4iB/SQ9Ladau tsje87ThwOoANV4VoheLbC8= X-Google-Smtp-Source: AG47ELsjFbR2ja55XjQq0rNFrbsr8twdhz3Yq0pOJHB+QCCp+RroUog6txM9sDrCWUzYkqkigCXKPg== X-Received: by 2002:a17:902:7c07:: with SMTP id x7-v6mr14857891pll.150.1520292992798; Mon, 05 Mar 2018 15:36:32 -0800 (PST) Received: from roblaptop (d49-188-35-108.sun1.vic.optusnet.com.au. [49.188.35.108]) by smtp.gmail.com with ESMTPSA id y84sm27575299pff.81.2018.03.05.15.36.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 15:36:32 -0800 (PST) Message-ID: <1520292987.2265.6.camel@gmail.com> Subject: Re: JDBC4 and setting statement_timeout: responds "is not yet implemented" From: rob stone To: Gunnar Halvorsen , pgsql-general@postgresql.org Date: Tue, 06 Mar 2018 10:36:27 +1100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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