On Tue, 29 Oct 2024 at 22:01, PG Bug reporting form
<noreply@postgresql.org> wrote:
> SELECT
> jsonb_path_query('605814335005781813025241542787157911726959411820757128006101511735853521072'::JSONB,
> '$.number()') AS jsonb_path_value, -- Works.
> ARRAY['605814335005781813025241542787157911726959411820757128006101511735853521072']::NUMERIC[]
> as direct_numeric_array_outer, -- Inaccurate.
> ARRAY['605814335005781813025241542787157911726959411820757128006101511735853521072'::NUMERIC]
> as direct_numeric_array_inner, -- Inaccurate.
> '605814335005781813025241542787157911726959411820757128006101511735853521072'::NUMERIC
> as direct_numeric; -- Works.
>
> {
> "jsonb_path_value" :
> "605814335005781813025241542787157911726959411820757128006101511735853521072",
> "direct_numeric_array_outer" :
> "{605,814,335,005,781,800,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000}",
> "direct_numeric_array_inner" :
> "{605,814,335,005,781,800,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000}",
> "direct_numeric" :
> 605814335005781813025241542787157911726959411820757128006101511735853521072
> }
>
> Is it not possible to store these values in an array accurately?
Which client are you using here? The thousands separator isn't
something we add to the numeric output, so something else must be
doing that. I suspect whatever third-party client you're using is
what's causing the problem.
Do you have any issues with psql?
David