Attached is the updated patch. As mentioned earlier, jsonb will be fetched as text. Only when the pop up editor opens, json-bignumber parser will be used to prettify.
Attached is the patch to fix incorrect rendering of bigint in jsonb.
The problem is in javascript limitations with big numbers. For fixing, jsonb data will be fetched as string now, similar to json, so that JS will not consider big numbers as number. The only drawback here is that, the popup editor will not show formatted json, as that requires JSON.parse which will change the big numbers.
Kindly review.
Below is sample data for testing:
CREATE TABLE public.tab_jsonbigint
(
id integer NOT NULLPRIMARY KEY,
coljsonb jsonb
)
insert into tab_jsonbigint(id, coljsonb) values(3,'[{"a": 83136002445762248}, {"a": 831360024457622448}]');
select d.*, t.coljsonb from tab_jsonbigint t, jsonb_to_recordset(t.coljsonb) as d("a" bigint);
Hmm, that's unfortunate.
What about using json-bignumber?
Had thought of using json-bigint similar to json-bignumber, but the question is, do we need add extra overhead of using library for the grid cells?
However, we can use json-big* library only editor pop up and just use plain text when in grid cells.
From:
Dave Page Date: Subject:
Re: [pgAdmin4][Patch]: RM #3933 Error dropping database pop upmessage displayed if user try to drop any database with Arabic character withnon super user
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.