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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: r.zharkov@postgrespro.ru
Дата:
Сообщение: Re: BUG #15727: PANIC: cannot abort transaction 295144144, it wasalready committed
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15732: Jessie backports removed from network