[Git][java-team/libpostgresql-jdbc-java][master] 3 commits: New upstream version 42.7.3
Christoph Berg (@myon)
gitlab at salsa.debian.org
Fri Mar 15 14:14:24 GMT 2024
Christoph Berg pushed to branch master at Debian Java Maintainers / libpostgresql-jdbc-java
Commits:
dc71d5d1 by Christoph Berg at 2024-03-15T15:13:36+01:00
New upstream version 42.7.3
- - - - -
cde705ed by Christoph Berg at 2024-03-15T15:13:39+01:00
Update upstream source from tag 'upstream/42.7.3'
Update to upstream version '42.7.3'
with Debian dir f9bc398f21541f52746507ff85c505cebbafd9c4
- - - - -
2f0226fd by Christoph Berg at 2024-03-15T15:14:05+01:00
New upstream version 42.7.3.
- - - - -
7 changed files:
- debian/changelog
- pom.xml
- src/main/java/org/postgresql/PGConnection.java
- src/main/java/org/postgresql/core/v3/SimpleParameterList.java
- src/main/java/org/postgresql/util/DriverInfo.java
- src/main/resources/META-INF/MANIFEST.MF
- src/test/java/org/postgresql/test/jdbc42/PreparedStatementTest.java
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+libpgjava (42.7.3-1) unstable; urgency=medium
+
+ * New upstream version 42.7.3.
+
+ -- Christoph Berg <myon at debian.org> Fri, 15 Mar 2024 15:13:39 +0100
+
libpgjava (42.7.2-1) unstable; urgency=medium
* New upstream version 42.7.2. (CVE-2024-1597)
=====================================
pom.xml
=====================================
@@ -10,7 +10,7 @@
<artifactId>postgresql</artifactId>
<packaging>jar</packaging>
<name>PostgreSQL JDBC Driver - JDBC 4.2</name>
- <version>42.7.2</version>
+ <version>42.7.3</version>
<description>Java JDBC 4.2 (JRE 8+) driver for PostgreSQL database</description>
<url>https://github.com/pgjdbc/pgjdbc</url>
=====================================
src/main/java/org/postgresql/PGConnection.java
=====================================
@@ -276,7 +276,7 @@ public interface PGConnection {
if (encryptionType == null) {
try (ResultSet rs = stmt.executeQuery("SHOW password_encryption")) {
if (!rs.next()) {
- throw new PSQLException(GT.tr("Expected a row when reading password_encrypton but none was found"),
+ throw new PSQLException(GT.tr("Expected a row when reading password_encryption but none was found"),
PSQLState.NO_DATA);
}
encryptionType = rs.getString(1);
=====================================
src/main/java/org/postgresql/core/v3/SimpleParameterList.java
=====================================
@@ -317,23 +317,57 @@ class SimpleParameterList implements V3ParameterList {
}
} else {
textValue = paramValue.toString();
- int paramType = paramTypes[index];
- if (paramType == Oid.TIMESTAMP) {
- type = "timestamp";
- } else if (paramType == Oid.TIMESTAMPTZ) {
- type = "timestamp with time zone";
- } else if (paramType == Oid.TIME) {
- type = "time";
- } else if (paramType == Oid.TIMETZ) {
- type = "time with time zone";
- } else if (paramType == Oid.DATE) {
- type = "date";
- } else if (paramType == Oid.INTERVAL) {
- type = "interval";
- } else if (paramType == Oid.NUMERIC) {
- type = "numeric";
- } else {
- type = null;
+ switch (paramTypes[index]) {
+ case Oid.INT2:
+ type = "int2";
+ break;
+ case Oid.INT4:
+ type = "int4";
+ break;
+ case Oid.INT8:
+ type = "int8";
+ break;
+ case Oid.FLOAT4:
+ type = "real";
+ break;
+ case Oid.FLOAT8:
+ type = "double precision";
+ break;
+ case Oid.TIMESTAMP:
+ type = "timestamp";
+ break;
+ case Oid.TIMESTAMPTZ:
+ type = "timestamp with time zone";
+ break;
+ case Oid.TIME:
+ type = "time";
+ break;
+ case Oid.TIMETZ:
+ type = "time with time zone";
+ break;
+ case Oid.DATE:
+ type = "date";
+ break;
+ case Oid.INTERVAL:
+ type = "interval";
+ break;
+ case Oid.NUMERIC:
+ type = "numeric";
+ break;
+ case Oid.UUID:
+ type = "uuid";
+ break;
+ case Oid.BOOL:
+ type = "boolean";
+ break;
+ case Oid.BOX:
+ type = "box";
+ break;
+ case Oid.POINT:
+ type = "point";
+ break;
+ default:
+ type = null;
}
}
return quoteAndCast(textValue, type, standardConformingStrings);
=====================================
src/main/java/org/postgresql/util/DriverInfo.java
=====================================
@@ -16,13 +16,13 @@ public final class DriverInfo {
// Driver name
public static final String DRIVER_NAME = "PostgreSQL JDBC Driver";
public static final String DRIVER_SHORT_NAME = "PgJDBC";
- public static final String DRIVER_VERSION = "42.7.2";
+ public static final String DRIVER_VERSION = "42.7.3";
public static final String DRIVER_FULL_NAME = DRIVER_NAME + " " + DRIVER_VERSION;
// Driver version
public static final int MAJOR_VERSION = 42;
public static final int MINOR_VERSION = 7;
- public static final int PATCH_VERSION = 2;
+ public static final int PATCH_VERSION = 3;
// JDBC specification
public static final String JDBC_VERSION = "4.2";
=====================================
src/main/resources/META-INF/MANIFEST.MF
=====================================
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-License: BSD-2-Clause
Implementation-Title: PostgreSQL JDBC Driver
-Implementation-Version: 42.7.2
+Implementation-Version: 42.7.3
Specification-Vendor: Oracle Corporation
Specification-Version: 4.2
Specification-Title: JDBC
=====================================
src/test/java/org/postgresql/test/jdbc42/PreparedStatementTest.java
=====================================
@@ -54,6 +54,18 @@ public class PreparedStatementTest extends BaseTest4 {
Assert.assertEquals(new BigDecimal("3.2"), d);
}
+ @Test
+ public void testSetBoolean() throws SQLException {
+ try (PreparedStatement ps = con.prepareStatement("select false union select (select ?)")) {
+ ps.setBoolean(1, true);
+
+ try (ResultSet rs = ps.executeQuery()) {
+ assert (rs.next());
+ rs.getBoolean(1);
+ }
+ }
+ }
+
@Test
public void testTimestampTzSetNull() throws SQLException {
PreparedStatement pstmt = con.prepareStatement("INSERT INTO timestamptztable (tstz) VALUES (?)");
View it on GitLab: https://salsa.debian.org/java-team/libpostgresql-jdbc-java/-/compare/0649f0733b6b529f1ecf76ee0879d76ef646d841...2f0226fd7c3e8b1a6585af47af3398f1cf07ec5c
--
View it on GitLab: https://salsa.debian.org/java-team/libpostgresql-jdbc-java/-/compare/0649f0733b6b529f1ecf76ee0879d76ef646d841...2f0226fd7c3e8b1a6585af47af3398f1cf07ec5c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20240315/cbc79f01/attachment.htm>
More information about the pkg-java-commits
mailing list