BUG #15260: When saving json object to a json column bigInteger value is saved wrong

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: urip(at)ensilo(dot)com
Subject: BUG #15260: When saving json object to a json column bigInteger value is saved wrong
Date: 2018-07-03 09:13:43
Message-ID: 153060922319.13258.1825649892372139910@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15260
Logged by: Uri Parush
Email address: urip(at)ensilo(dot)com
PostgreSQL version: 9.6.0
Operating system: windows 10
Description:

Hi, I think I found a bug in PostgreSQL json column type.
I created the next table:
CREATE TABLE public."Dummy"
(
json json
)

And insert the next data:
INSERT INTO public."Dummy"(
json)
VALUES (
'{ "ID": 9059650307334996772}'
);

The data that was saved was incorrect:
{"ID":9059650307334997000}

Looks like PostgreSQL round the number in the insertion.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2018-07-03 09:17:51 Re: BUG #15260: When saving json object to a json column bigInteger value is saved wrong
Previous Message Tom Lane 2018-07-03 05:28:50 Re: NOTIFY does not work as expected