-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters