Bug report - incorrect value displayed in jsonb column for large numbers
От | Michał Iwańczuk |
---|---|
Тема | Bug report - incorrect value displayed in jsonb column for large numbers |
Дата | |
Msg-id | CAG0+XYDbm=EuwxoXGQf=gFRpt8Fe-f805tNnTLxoBp23xwSG=g@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Bug report - incorrect value displayed in jsonb column for large numbers
|
Список | pgsql-bugs |
Hello,
I hope that it is correct place for bug report.
I have found bug in pg admin where if jsonb contains field with large numerical value (maybe extending JS Number.MAX_SAFE_INTEGER value?) then value displayed in column gets incorrectly rounded). Whole issue is described in https://stackoverflow.com/questions/55491006/incorrect-insert-of-bigint-into-jsonb-column-when-using-pgadmin-4.
- PGAdmin4 version 3.6
- Ubuntu 18.04.2 LTS
- desktop mode
- repro steps:
0) open query tool in some db
1) create table:
CREATE TABLE document_wrapper
( id integer NOT NULL, document jsonb NOT NULL, CONSTRAINT document_pkey PRIMARY KEY (id)
)
WITH ( OIDS = FALSE
)
TABLESPACE pg_default;
2) insert value
insert into document_wrapper(id, document) values(-8, '{"id":101861191707868275}');
3) select value
SELECT document FROM document_wrapper where id = -8;
4) Observe incorrect result (note 0 at the end):
{ "id": 101861191707868270 }?
If more info is needed please contact me
Michał Iwańczuk
В списке pgsql-bugs по дате отправления: