Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDRso-0003mT-Pq for pgsql-jdbc@arkaria.postgresql.org; Mon, 08 Apr 2019 10:52:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDRsm-0008EK-SP for pgsql-jdbc@arkaria.postgresql.org; Mon, 08 Apr 2019 10:52:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDRsm-0008EC-Fg for pgsql-jdbc@lists.postgresql.org; Mon, 08 Apr 2019 10:52:08 +0000 Received: from o1.sgmail.github.com ([192.254.114.176]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDRsj-0002w1-DR for pgsql-jdbc@lists.postgresql.org; Mon, 08 Apr 2019 10:52:07 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:to:subject:mime-version:content-type:content-transfer-encoding; s=s20150108; bh=3yV+T7jHG2tp2TiXaIsc2PRaHlc=; b=kNxU8oiUv07aYDPY Mjg0JxUqlt0+mOo9ESAyLxErqwMU1KLRGN+Z3KIS2FNgmRmVsPUgt4GitGomAmTl k3EtaiNsvlV9XWBnJQAU5pTkWx8CRGJZBLRgzQim/rsRUvlXPFB7VxkMbF9OCdbQ lmCKmwSLYCon+41rEAz/NDOhokY= Received: by filter0631p1iad2.sendgrid.net with SMTP id filter0631p1iad2-17040-5CAB27D4-1B 2019-04-08 10:52:04.431610431 +0000 UTC m=+212524.488419534 Received: from github-lowworker-e51511d.cp1-iad.github.net (unknown [192.30.252.34]) by ismtpd0062p1mdw1.sendgrid.net (SG) with ESMTP id k4R8KyQxSBiz23h4A7t17Q for ; Mon, 08 Apr 2019 10:52:04.397 +0000 (UTC) Received: from github.com (localhost [127.0.0.1]) by github-lowworker-e51511d.cp1-iad.github.net (Postfix) with ESMTP id 4A1818096C for ; Mon, 8 Apr 2019 03:52:04 -0700 (PDT) Date: Mon, 08 Apr 2019 10:52:04 +0000 (UTC) From: Nikolai Ivanov To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] b6ab27: fix: improper relative cursor movement (#1462) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All X-SG-EID: f0kCtr4+kOV24JpVqX2lDXk15zO1V/uGBhMWOVUBmYyZ2+03jJQDlco0YI0YrNLPkvLykgwWqOLt8Q 8sFUz9P8TfUonRaRmgU0X0LD5+TFzwYjhnJwT9wtDEak2ZzafX2kXQ/ik2k7MPN3lsuS2+IT1Azk/s 3kLa5h1K0r6FaEwHMmwNUvFfsVOEdsfVDwZm2U3Nyh5v+Hg65SnyaPSqw20TGdgl1VA8tzEjD3QOA8 A= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: b6ab27c170ebeb88728f33207924d664ce7f7d77 https://github.com/pgjdbc/pgjdbc/commit/b6ab27c170ebeb88728f33207924d664ce7f7d77 Author: Nikolai Ivanov Date: 2019-04-08 (Mon, 08 Apr 2019) Changed paths: M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java M pgjdbc/src/test/java/org/postgresql/test/jdbc2/ResultSetTest.java Log Message: ----------- fix: improper relative cursor movement (#1462) Fix a wrong relative cursor movement when a new calculated index is negative (beyond the first row). According to the java-doc, in this case the position leaves before the first row. Current implementation of the 'relative' method delegates the movement to the 'absolute' method which treats a negative index with respect to the end of the result set.