Re: Regarding useObjects - Mailing list pgsql-jdbc

From Achilleas Mantzios - cloud
Subject Re: Regarding useObjects
Date
Msg-id 8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com
Whole thread Raw
In response to Re: Regarding useObjects  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: Regarding useObjects  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-jdbc
Good Day Vladimir

On 9/27/23 09:03, Vladimir Sitnikov wrote:
>> so there was the option to change this to false and recompile
> We try doing our best to keep backward compatibility both
> compilation-wise and behaviour-wise.
> However, we treat "private fields and methods" as private, and we do
> not expect people would depend on them.
> If you have to modify sources or depend on private APIs I would
> suggest raising an issue or PR so it could be incorporated
> into the driver itself.
>
> Would you please provide a test case of what you are doing with PgArray?
> What is exactly the sequence of JDBC calls, the actual and the
> expected outcomes in your case?

E.g. for the case of floats, we have to change all:

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

float flarr[] = (float[]) objarr;

to

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

Float flarr[] = (Float[]) objarr;

>
> The mentioned "useObjects" has been removed in
> https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays)
>
> Vladimir



pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Regarding useObjects
Next
From: Dave Cramer
Date:
Subject: Re: Regarding useObjects