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

Regression for creating float8 arrays #2597

Closed
beikov opened this issue Aug 17, 2022 · 3 comments
Closed

Regression for creating float8 arrays #2597

beikov opened this issue Aug 17, 2022 · 3 comments

Comments

@beikov
Copy link
Contributor

beikov commented Aug 17, 2022

Describe the issue
The change in #1986 leads to a problem in Hibernate ORM when working with array types. So far, the type float was interpreted as float8, but after this change it will be interpreted as float4.

Driver Version? 42.4.1
Java Version? 11
OS Version? -
PostgreSQL Version? -
To Reproduce

Do Connection.createArray("float", new Double[]{})

Expected behaviour

The PG type is _float8, but actually is _float4

@davecramer
Copy link
Member

@bokken thoughts ?

@bokken
Copy link
Member

bokken commented Aug 18, 2022

Based on https://www.postgresql.org/docs/current/datatype-numeric.html#id-1.5.7.9.8.16:
float with no precision specified is taken to mean double precision.

The javadoc for createArray states:
typeName - the SQL name of the type the elements of the array map to. The typeName is a database-specific name which may be the name of a built-in type, a user-defined type or a standard SQL type supported by this database.

So I think taking those 2 together, that float should be reverted to alias float8.

@davecramer
Copy link
Member

davecramer commented Aug 24, 2022

I've released 42.5.0 which fixes this see #2598

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

No branches or pull requests

3 participants