[pgAdmin4][RM3587] Browser rendering of a bigint in a jsonb is wrong
Hi Hackers, 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 NULL PRIMARY 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); -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" RM3587.patch Description: Binary data
[pgAdmin4][Patch] - Encoding Fixes
Hi, Please find the attached patch to fix the encoding related issues. #3992 - View data causes errors with DB encoding EUC_JIS_2004 #3982 - Encoding Problem with PGAdmin 4.2 #3911 - Data output does not display Arabic in WIN1256 encoding database - The CSV download for the same encoding has also been fixed. I have tested the patch on Python 2.7, 3.5, 3.6 and 3.7. Thanks, Khushboo encoding_fixes.patch Description: Binary data
pgAdmin 4 commit: Support double-click on Query Tool result grid column
Support double-click on Query Tool result grid column resize handles to auto-size to the content. Fixes #4034 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9c5b9364b619c148b2542ac9ab907eb90247d4f8 Author: Aditya Toshniwal Modified Files -- docs/en_US/release_notes_4_3.rst | 1 + .../static/js/selection/active_cell_capture.js | 5 + .../js/slickgrid/plugins/slick.autocolumnsize.js | 160 + web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 4 +- web/webpack.shim.js| 1 + 5 files changed, 170 insertions(+), 1 deletion(-)
Re: [pgAdmin4][RM4034] Auto resize column when double clicked on column resizer is SQL data output grid
Thanks - applied! On Mon, Feb 25, 2019 at 10:58 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the patch to Auto resize column when double clicked on column > resizer is SQL data output grid. > > Kindly review. > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: [pgAdmin4][RM3587] Browser rendering of a bigint in a jsonb is wrong
Hi On Tue, Feb 26, 2019 at 8:55 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > 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 NULL PRIMARY 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? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: [pgAdmin4][RM3587] Browser rendering of a bigint in a jsonb is wrong
Hi, On Tue, Feb 26, 2019 at 8:04 PM Dave Page wrote: > Hi > > On Tue, Feb 26, 2019 at 8:55 AM Aditya Toshniwal < > aditya.toshni...@enterprisedb.com> wrote: > >> Hi Hackers, >> >> 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 NULL PRIMARY 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. Will send a updated patch with json-big*. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree"
Re: Result grid rendering (was: Re: [pgAdmin4][Pattch] - RM #3673 - "Download as .csv" F8 does NOT work when one of joined files is a TEMPORARY file)
Hi Dave, Please find the attached fix. I have added the configurable option to add the extra classes in the panel.js, so in the future, we can utilize it if required. Here, I have added a class to hide the extra vertical scrollbar to the Datagrid panel. Thanks, Khushboo On Tue, Feb 26, 2019 at 7:08 PM Dave Page wrote: > Hi Khushboo, > > On Wed, Feb 20, 2019 at 10:06 AM Khushboo Vashi < > khushboo.va...@enterprisedb.com> wrote: > >> >> Also, the result grid seems to only be rendering itself to use about 50% of the available vertical height now. Is that something messed up on my system, or are you seeing it as well? This issue is the side effect of the Scratch Pad commit and has already >>> been logged by Akshay. I will fix along with this RM. >>> >> Fixed. >> > > I've started seeing weirdness with the Query Tool grid again. If I run > View Data on a table with more rows than can be seen on screen at once, I > get a double scrollbar. If I then resize the grid, the double scrollbar > vanishes, but the grid re-renders incorrectly. Screenshots attached. > > Can you take a look please? > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > data_grid_fix.patch Description: Binary data
Re: [pgAdmin4][RM3587] Browser rendering of a bigint in a jsonb is wrong
Hi Hackers, 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. Kindly review. On Wed, Feb 27, 2019 at 10:12 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi, > > On Tue, Feb 26, 2019 at 8:04 PM Dave Page wrote: > >> Hi >> >> On Tue, Feb 26, 2019 at 8:55 AM Aditya Toshniwal < >> aditya.toshni...@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> 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 NULL PRIMARY 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. > Will send a updated patch with json-big*. > >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" RM3587_v2.patch Description: Binary data
[pgAdmin4][Patch]: RM #3933 Error dropping database pop up message displayed if user try to drop any database with Arabic character with non super user
Hi Hackers, Attached is the patch to fix RM #3933 "Error dropping database pop up message displayed if user try to drop any database with Arabic character with non super user". There is an exception in the logging system for Arabic characters. I have read https://docs.python.org/2/library/logging.html#logging.Handler. handleError and as part of fix set *logging.raiseException = False* Please review it. -- *Akshay Joshi* *Sr. Software Architect * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* RM_3933.patch Description: Binary data