[pgjdbc/pgjdbc] fcd1ea: fix: wrong results when a single statement is used...

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] fcd1ea: fix: wrong results when a single statement is used...
Date: 2018-03-11 08:44:56
Message-ID: 5aa4ec8898de8_5e1e2ab7f78e1c1c100772@hookshot-fe-cace476.cp1-iad.github.net.mail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: fcd1ea14545a113fe4a124e17132824e279f572e
https://github.com/pgjdbc/pgjdbc/commit/fcd1ea14545a113fe4a124e17132824e279f572e
Author: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Date: 2018-03-11 (Sun, 11 Mar 2018)

Changed paths:
M CHANGELOG.md
M pgjdbc/src/main/java/org/postgresql/core/Oid.java
M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
M pgjdbc/src/main/java/org/postgresql/core/v3/SimpleQuery.java
A pgjdbc/src/test/java/org/postgresql/core/OidToStringTest.java
A pgjdbc/src/test/java/org/postgresql/core/OidValueOfTest.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/PreparedStatementTest.java

Log Message:
-----------
fix: wrong results when a single statement is used with UNSPECIFIED types (#1137)

Timestamp, date (and some other types), are sent as UNSPECIFIED, and pgjdbc did not verify the actual parameter types at parse time.
This might cause wrong results if the query was parsed with explicit type (e.g. setString(...)), and then re-executed with
TIMESTAMP parameter (timestamps are sent as UNSPECIFIED, thus pgjdbc silently accepted the statement even though it should reparse)

fixes #648
closes #674

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2018-03-11 12:06:10 [pgjdbc/pgjdbc] af4996: test: workaround DST issue in StatementTest#testDa...
Previous Message chalda 2018-03-11 08:40:21 [pgjdbc/pgjdbc] e5aab1: Adjust XAException return codes for better compati...