From: | Achilleas Mantzios - cloud <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com> |
---|---|
To: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
Cc: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Regarding useObjects |
Date: | 2023-09-27 10:00:09 |
Message-ID: | 405c32b4-4b39-b961-010c-93386e7f7ac4@cloud.gatewaynet.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 9/27/23 12:44, Dave Cramer wrote:
>
>
> On Wed, 27 Sept 2023 at 05:00, Achilleas Mantzios - cloud
> <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com> wrote:
>
> 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;
>
>
>
> So the problem with using float instead of Float is that it is
> impossible to have a null float and arrays can have nulls.
Thanks Dave, we wrote much of the code before 2008, and we had to
implement our own version of nulls in arrays of primitives. So this code
was stuck everywhere. Plus we got like 120+ remote sites (slaves) (
which run ... even older code) so we must fully support them as well.
Its only about 200 source files in the central system's repo, so we will
have to do it sooner or later.
The hard part would be migrating from pgsql 10 to 16.
>
> Dave
>
>
> >
> > The mentioned "useObjects" has been removed in
> > https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding
> arrays)
> >
> > Vladimir
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios - cloud | 2023-09-27 10:07:39 | Re: Regarding useObjects |
Previous Message | Vladimir Sitnikov | 2023-09-27 09:55:35 | Re: Regarding useObjects |