public inbox for [email protected]
help / color / mirror / Atom feedFrom: Brendan MacDonell <[email protected]>
To: [email protected]
Subject: [pgjdbc/pgjdbc] 5709a2: fix: allow setting arrays with ANSI type name (#2952)
Date: Thu, 07 Sep 2023 08:30:43 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 5709a20fbef453749d2394e11502527e4a3ab5bb
https://github.com/pgjdbc/pgjdbc/commit/5709a20fbef453749d2394e11502527e4a3ab5bb
Author: Brendan MacDonell <[email protected]>
Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/ArrayTest.java
Log Message:
-----------
fix: allow setting arrays with ANSI type name (#2952)
* fix: allow setting arrays with ANSI type name
Currently, pgjdbc does not support setting arrays using ANSI type names
like `double precision` or `timestamp with timezone`. For example,
`conn.createArrayOf("double precision", new Object[] {0d})`
fails with the exception "Unable to find server array type for provided
name double precision". This can be worked around by using the PostgreSQL
type name (e.g. `float8`) instead, however it seems like the driver should
be able to handle the same set of array types as PostgreSQL itself.
This isn't the first attempt to fix this issue. In 2020, #1719 was merged
to fix the same problem. The patch caused some introspected types to change
(#1744), and was reverted by #1745. Adding the missing types to `TYPE_ALIASES`
fixes the problem, and avoids the OID collisions that caused #1744.
* Wrap testSetArraysWithAnsiTypeNames in try-finally
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] 5709a2: fix: allow setting arrays with ANSI type name (#2952)
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox