From: Jorge Solórzano <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] bf0038: fix: handle nulls when the following clasess are u...
Date: Tue, 28 Sep 2021 19:02:54 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/a2085c-bf0038@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: bf00387461bafdf0f19a8557bff554e469207cce
https://github.com/pgjdbc/pgjdbc/commit/bf00387461bafdf0f19a8557bff554e469207cce
Author: Jorge Solórzano <jorsol@gmail.com>
Date: 2021-09-29 (Wed, 29 Sep 2021)
Changed paths:
M CHANGELOG.md
M pgjdbc/src/main/java/org/postgresql/geometric/PGbox.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGcircle.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGline.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGlseg.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpath.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpoint.java
M pgjdbc/src/main/java/org/postgresql/geometric/PGpolygon.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
M pgjdbc/src/main/java/org/postgresql/util/PGInterval.java
M pgjdbc/src/main/java/org/postgresql/util/PGmoney.java
M pgjdbc/src/main/java/org/postgresql/util/PGobject.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectGetTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/PGObjectSetTest.java
Log Message:
-----------
fix: handle nulls when the following clasess are used: PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney (#2271)
1) PGobject.setValue(null) can be used to set the wrapped value to null
Note: previously the sub-classes of PGobject threw NPE for setValue(null)
2) Return null from `getValue` in case the typed null is received from the database
3) Assume PGBinaryObject#lengthInBytes == 0 means the value should be set as null when sending data to the database
see #1870
Co-authored-by: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] bf0038: fix: handle nulls when the following clasess are u...
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/a2085c-bf0038@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/a2085c-bf0038@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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