Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue in handling of timestamp type
Hi Dave, Please find a fix for the same, attribute length was set to False instead of None. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Feb 6, 2017 at 11:18 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Sure, Checking. > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > On Sat, Feb 4, 2017 at 7:34 PM, Dave Page wrote: > >> Hi Murtuza, >> >> I clearly neglected to run the regression tests with this patch, and >> unfortunately it looks like it broke them. Can you look at this ASAP >> please? >> >> runTest (pgadmin.browser.server_groups.servers.databases.schemas. >> tables.column.tests.test_column_add.ColumnAddTestCase) >> This function will add column under table node. (Add table Node URL) >> ... 2017-02-04 14:43:55,191: ERROR pgadmin: Failed to execute query >> (execute_scalar) for the server #4 - DB:test_db_9e176 (Query-id: >> 4792242): >> Error Message:ERROR: syntax error at or near "False" >> LINE 2: ADD COLUMN test_column_add_f0d5d char(False); >> ^ >> FAIL >> >> As far as I can see, the app works fine - it's only the test that >> broke (probably because the application uses type name aliases (e.g. >> character) rather than the base type name that the test is using >> ("char"). >> >> Thanks. >> >> On Fri, Feb 3, 2017 at 1:52 PM, Dave Page wrote: >> > Thanks - patch applied. >> > >> > On Fri, Feb 3, 2017 at 11:46 AM, Murtuza Zabuawala >> > wrote: >> >> Hi, >> >> >> >> Please find updates patch for the same. >> >> RM#2076 >> >> >> >> -- >> >> Regards, >> >> Murtuza Zabuawala >> >> EnterpriseDB: http://www.enterprisedb.com >> >> The Enterprise PostgreSQL Company >> >> >> >> On Wed, Feb 1, 2017 at 3:08 PM, Dave Page wrote: >> >>> >> >>> Hi >> >>> >> >>> On Tue, Jan 31, 2017 at 5:19 AM, Murtuza Zabuawala >> >>> wrote: >> >>> > Hi Dave, >> >>> > >> >>> > PFA updated patch. >> >>> >> >>> This seems to display "timestamp(0) with[out] timezone" columns >> >>> correctly in both the properties panel and dialog now, but the size is >> >>> still ignored if I try to add a new column through the table or column >> >>> dialogue. >> >>> >> >>> -- >> >>> Dave Page >> >>> Blog: http://pgsnake.blogspot.com >> >>> Twitter: @pgsnake >> >>> >> >>> EnterpriseDB UK: http://www.enterprisedb.com >> >>> The Enterprise PostgreSQL Company >> >> >> >> >> > >> > >> > >> > -- >> > Dave Page >> > Blog: http://pgsnake.blogspot.com >> > Twitter: @pgsnake >> > >> > EnterpriseDB UK: http://www.enterprisedb.com >> > The Enterprise PostgreSQL Company >> >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py index 25542d7..fb2bbe7 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py @@ -55,7 +55,7 @@ class ColumnAddTestCase(BaseTestGenerator): "attacl": [], "is_primary_key": False, "attnotnull": False, -"attlen": False, +"attlen": None, "attprecision": None, "attoptions": [], "seclabels": [] -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue in handling of timestamp type
Sure, Checking. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Sat, Feb 4, 2017 at 7:34 PM, Dave Page wrote: > Hi Murtuza, > > I clearly neglected to run the regression tests with this patch, and > unfortunately it looks like it broke them. Can you look at this ASAP > please? > > runTest (pgadmin.browser.server_groups.servers.databases. > schemas.tables.column.tests.test_column_add.ColumnAddTestCase) > This function will add column under table node. (Add table Node URL) > ... 2017-02-04 14:43:55,191: ERROR pgadmin: Failed to execute query > (execute_scalar) for the server #4 - DB:test_db_9e176 (Query-id: > 4792242): > Error Message:ERROR: syntax error at or near "False" > LINE 2: ADD COLUMN test_column_add_f0d5d char(False); > ^ > FAIL > > As far as I can see, the app works fine - it's only the test that > broke (probably because the application uses type name aliases (e.g. > character) rather than the base type name that the test is using > ("char"). > > Thanks. > > On Fri, Feb 3, 2017 at 1:52 PM, Dave Page wrote: > > Thanks - patch applied. > > > > On Fri, Feb 3, 2017 at 11:46 AM, Murtuza Zabuawala > > wrote: > >> Hi, > >> > >> Please find updates patch for the same. > >> RM#2076 > >> > >> -- > >> Regards, > >> Murtuza Zabuawala > >> EnterpriseDB: http://www.enterprisedb.com > >> The Enterprise PostgreSQL Company > >> > >> On Wed, Feb 1, 2017 at 3:08 PM, Dave Page wrote: > >>> > >>> Hi > >>> > >>> On Tue, Jan 31, 2017 at 5:19 AM, Murtuza Zabuawala > >>> wrote: > >>> > Hi Dave, > >>> > > >>> > PFA updated patch. > >>> > >>> This seems to display "timestamp(0) with[out] timezone" columns > >>> correctly in both the properties panel and dialog now, but the size is > >>> still ignored if I try to add a new column through the table or column > >>> dialogue. > >>> > >>> -- > >>> Dave Page > >>> Blog: http://pgsnake.blogspot.com > >>> Twitter: @pgsnake > >>> > >>> EnterpriseDB UK: http://www.enterprisedb.com > >>> The Enterprise PostgreSQL Company > >> > >> > > > > > > > > -- > > Dave Page > > Blog: http://pgsnake.blogspot.com > > Twitter: @pgsnake > > > > EnterpriseDB UK: http://www.enterprisedb.com > > The Enterprise PostgreSQL Company > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company >
[pgadmin-hackers] [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
Hi, PFA patch to fix the issue with Graphical Explain plan functionality which was breaking for INSERT/UPDATE/DELETE explain plans. RM#2133 *Issue:* It was due to typo in imageMapper object. Please review. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company diff --git a/web/pgadmin/misc/templates/explain/js/explain.js b/web/pgadmin/misc/templates/explain/js/explain.js index 382fd61..3c4c6d9 100644 --- a/web/pgadmin/misc/templates/explain/js/explain.js +++ b/web/pgadmin/misc/templates/explain/js/explain.js @@ -145,11 +145,11 @@ var imageMapper = { } }, "ModifyTable" : function(data) { - switch (data['Operaton']) { -case "insert": return { "image":"ex_insert.png", + switch (data['Operation']) { +case "Insert": return { "image":"ex_insert.png", "image_text":"Insert" }; -case "update": return {"image":"ex_update.png","image_text":"Update"}; +case "Update": return {"image":"ex_update.png","image_text":"Update"}; case "Delete": return {"image":"ex_delete.png","image_text":"Delete"}; } }, -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fix RM1790 - [Web] Support setting a field's value to "null"
Thanks - patch applied! On Sat, Feb 4, 2017 at 8:58 PM, Surinder Kumar wrote: > Hi Dave, > > I have overriden the checkbox editor to add 'indeterminate' state of > checkbox other than checked and unchecked which gives the user capability to > set [null] value > for boolean types. > > Please find updated patch and review. > > On Sat, Feb 4, 2017 at 6:47 PM, Dave Page wrote: >> >> BTW, this may help: https://css-tricks.com/indeterminate-checkboxes/ > > That's actually the solution. It works. > Thanks. >> >> >> >> On Sat, Feb 4, 2017 at 1:15 PM, Dave Page wrote: >> > Hi, >> > >> > This seems to work nicely now for text and int fields etc. but you >> > haven't handled booleans. They should have a 3 state checkbox in edit >> > mode (checked == true, clear == false, blurred == null (see pgAdmin >> > 3). >> > >> > I've committed the patch, but can you please get me an additional one >> > for boolean support for Monday morning my time please? > > Thanks. >> >> > >> > Thanks! >> > >> > On Sat, Feb 4, 2017 at 5:34 AM, Surinder Kumar >> > wrote: >> >> Hi Dave, >> >> >> >> Please find updated patch and review. >> >> >> >> On Fri, Feb 3, 2017 at 2:43 PM, Dave Page wrote: >> >>> >> >>> On Fri, Feb 3, 2017 at 7:28 AM, Surinder Kumar >> >>> wrote: >> >>> > Hi Dave, >> >>> > >> >>> > On Mon, Jan 30, 2017 at 6:18 PM, Dave Page >> >>> > wrote: >> >>> >> >> >>> >> On Fri, Jan 27, 2017 at 10:32 AM, Surinder Kumar >> >>> >> wrote: >> >>> >> > Hi Dave, >> >>> >> > >> >>> >> > Please find updated patch. >> >>> >> > >> >>> >> > On Mon, Jan 16, 2017 at 10:01 PM, Dave Page >> >>> >> > wrote: >> >>> >> >> >> >>> >> >> Hi >> >>> >> >> >> >>> >> >> On Fri, Jan 13, 2017 at 9:24 AM, Surinder Kumar >> >>> >> >> wrote: >> >>> >> >> > Hi >> >>> >> >> > >> >>> >> >> > Please find attached patch and review. >> >>> >> >> > >> >>> >> >> > On Sun, Jan 8, 2017 at 3:27 PM, Dave Page >> >>> >> >> > wrote: >> >>> >> >> >> >> >>> >> >> >> Hi >> >>> >> >> >> >> >>> >> >> >> On Friday, December 23, 2016, Surinder Kumar >> >>> >> >> >> wrote: >> >>> >> >> >>> >> >>> >> >> >>> Forgot to attach patch in last thread. please find patch. >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> >> It looks good for the most part, except: >> >>> >> >> >> >> >>> >> >> >> 1) You missed the part we discussed about being able to set a >> >>> >> >> >> value >> >>> >> >> >> to >> >>> >> >> >> '' >> >>> >> >> >> (the literal string containing two single quotes) by entering >> >>> >> >> >> \'\' >> >>> >> >> >> (and >> >>> >> >> >> of >> >>> >> >> >> course, the follow-on cases to allow setting a value to \'\' >> >>> >> >> >> by >> >>> >> >> >> entering >> >>> >> >> >> \\'\\' etc). >> >>> >> >> > >> >>> >> >> > Fixed. >> >>> >> >> >> >>> >> >> That doesn't seem right to me - the code you've written looks >> >>> >> >> like >> >>> >> >> it'll try to escape anything for use in a string literal, not >> >>> >> >> just >> >>> >> >> '\'\ or \\'\\' etc. >> >>> >> > >> >>> >> > Now the implementation is that It will find and unescape the >> >>> >> > string >> >>> >> > literals >> >>> >> > like '\'\ or \\'\\' etc. >> >>> >> >> >>> >> I ran some tests: >> >>> >> >> >>> >> - Setting a field to '' resulted in the following SQL: >> >>> >> >> >>> >> UPDATE public.emp SET >> >>> >> job = '' WHERE >> >>> >> empno = 7369; >> >>> >> >> >>> >> - Setting a field to \"\" resulted in the following SQL: >> >>> >> >> >>> >> UPDATE public.emp SET >> >>> >> job = '""' WHERE >> >>> >> empno = 7499; >> >>> >> >> >>> >> - Setting a field to \'\' displayed \'\' in the grid until >> >>> >> refreshed >> >>> >> when the value vanished. The SQL it ran was: >> >>> > >> >>> > In current behaviour, we are saving the value provided by user and >> >>> > we >> >>> > are >> >>> > not refreshing the grid with new values. >> >>> > Should we do refresh along with save? >> >>> >> >>> Why would you save the value provided? The point is to escape the >> >>> quotes with the slashes - i.e. to store the literal string '' (two >> >>> single quotes), the user enters \'\' (because entering just two single >> >>> quotes is how we enter an empty string). >> >> >> >> Implemented accordingly. I have tested all cases you provided and they >> >> are >> >> working. >> >> If there is still anything not working. Please let me know. I will fix. >> >>> >> >>> >> >>> I'm not sure why this is so hard - the original request was to make it >> >>> work like pgAdmin III. That's well defined and documented behaviour - >> >>> I even copied/pasted the description from the docs on this thread. >> >>> >> >>> >> >> >>> >> UPDATE public.emp SET >> >>> >> job = '' WHERE >> >>> >> empno = 7499; >> >>> >> >> >>> >> To be clear, here's what I'm expecting: >> >>> >> >> >>> >> Input: >> >>> >> Display: [null] >> >>> >> SQL: UPDATE t SET c = NULL WHERE k = >> >>> >> >> >>> >> Input: '' >> >>> >> Display: >> >>> >> SQL: UPDATE t SET c = '' WHERE k = >> >>> >> >> >>> >> Input: \'\' >> >>> >> Display: '' >> >>> >> SQL: UPDATE t SET c = '
[pgadmin-hackers] pgAdmin 4 commit: Handle NULL booleans in the data editor. Fixes #1790
Handle NULL booleans in the data editor. Fixes #1790 Branch -- master Details --- http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4566877188b3e41caa3a2a786a930c98f8d1d40e Author: Surinder Kumar Modified Files -- .../static/js/slickgrid/slick.pgadmin.editors.js | 90 ++ .../js/slickgrid/slick.pgadmin.formatters.js | 7 +- .../tools/sqleditor/static/css/sqleditor.css | 5 ++ 3 files changed, 101 insertions(+), 1 deletion(-) -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers