Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix: add support for full names of data types" #1745

Closed
wants to merge 6 commits into from

Conversation

davecramer
Copy link
Member

This change broke many things in the type cache.
I'm also not sure what it was attempting to rectify ?

vlsi and others added 6 commits March 30, 2020 13:52
JMH license is GPL With Classpath-Exception, so it does not require
to license user-written code under GPL.
Maven -> Gradle, remove jre6
@davecramer davecramer closed this Mar 30, 2020
@davecramer davecramer deleted the revert-1719-sql_standard_type_names branch March 30, 2020 16:01
bremac added a commit to bremac/pgjdbc that referenced this pull request Sep 6, 2023
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, pgjdbc#1719 was merged
to fix the same problem. The patch caused some introspected types to change
(pgjdbc#1744), and was reverted by pgjdbc#1745. Adding the missing types to `TYPE_ALIASES`
fixes the problem, and avoids the OID collisions that caused pgjdbc#1744.
davecramer pushed a commit that referenced this pull request Sep 7, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants