From: crwr45 <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] 30843e: fix: allow DatabaseMetaData.getColumns to describe...
Date: Tue, 25 Feb 2020 07:15:35 -0800
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/25eb32-30843e@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 30843e45edc1e2bac499df2d1576c2db4d3d3309
https://github.com/pgjdbc/pgjdbc/commit/30843e45edc1e2bac499df2d1576c2db4d3d3309
Author: crwr45 <34647635+crwr45@users.noreply.github.com>
Date: 2020-02-25 (Tue, 25 Feb 2020)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc42/DatabaseMetaDataTest.java
Log Message:
-----------
fix: allow DatabaseMetaData.getColumns to describe an unset scale (#1716)
getColumns returns a 0 for the scale of a Decimal or Numeric column when the
scale is 0, and when the scale is null. The caller can then not differentiate
between a 0 or a null without another query.
This change replaces the 0 in the ResultSet for scale with a null when describing
an unscaled Decimal or Numeric column. getInt will still convert the null to a 0,
but the caller can then use wasNull() to find out if the underlying value was 0
or null.
This addresses Issue 1712. It is a breaking change, but if the correct getter
(getInt) is used for the column, there is no difference. Other getters may behave
differently.
Signed-off-by: crwr45 <charlie.wheelerrobinson@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] 30843e: fix: allow DatabaseMetaData.getColumns to describe...
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/25eb32-30843e@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/25eb32-30843e@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