[RM#4546] Add RE-SQL tests for Column node

2019-07-31 Thread Murtuza Zabuawala
Hi,

PFA patch to add RE-SQL tests for Column node.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


column_resql_tests.diff
Description: Binary data


Re: Query Tool Fix

2019-07-31 Thread Dave Page
Hi

On Wed, Jul 31, 2019 at 6:05 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Yosry,
>
> The changes to fix 4520 are in python side. I would suggest if you can
> separate it out from this patch, so that we can ask the users(affected by
> 4520) to just replace the python files in their installed pgAdmin4. This
> fix will not be available till next release, but we can give the workaround
> files. Most users are unable to upgrade psycopg2 on their systems.
>

Agreed. As a general rule, we try to keep to one fix per patch/commit as it
makes it much easier to understand changes, especially after some time.
Having a stated dependency between patches is fine if that's necessary.

Can you split the changes up please?

Thanks.


>
> On Tue, Jul 30, 2019 at 8:10 PM Yosry Muhammad  wrote:
>
>> Hi,
>>
>> Please find attached a patch with the following bug fixes for the query
>> tool:
>> - View data not working correctly when the table/view does not contain
>> any columns (#4492).
>> - Query tool does not produce results when psycopg2 version is below 2.8
>> (#4520).
>> - Command tags and number of affected rows not shown in the query result
>> messages (#4525 and #4529 - duplicates).
>>
>> Note that:
>> #4524 and #4522 are feature requests for already existing features.
>>
>> Please review !
>> Thanks
>>
>>
>> --
>> *Yosry Muhammad Yosry*
>>
>> Computer Engineering student,
>> The Faculty of Engineering,
>> Cairo University (2021).
>> Class representative of CMP 2021.
>> https://www.linkedin.com/in/yosrym93/
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB India | 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: Query Tool Fix

2019-07-31 Thread Yosry Muhammad
Please find separate patch files attached. I believe there isn't any
dependency between the patches.

#4525 and #4529 are duplicates - both are fixed by the patch.

On Wed, Jul 31, 2019 at 3:49 PM Dave Page  wrote:

> Hi
>
> On Wed, Jul 31, 2019 at 6:05 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Yosry,
>>
>> The changes to fix 4520 are in python side. I would suggest if you can
>> separate it out from this patch, so that we can ask the users(affected by
>> 4520) to just replace the python files in their installed pgAdmin4. This
>> fix will not be available till next release, but we can give the workaround
>> files. Most users are unable to upgrade psycopg2 on their systems.
>>
>
> Agreed. As a general rule, we try to keep to one fix per patch/commit as
> it makes it much easier to understand changes, especially after some time.
> Having a stated dependency between patches is fine if that's necessary.
>
> Can you split the changes up please?
>
> Thanks.
>
>
>>
>> On Tue, Jul 30, 2019 at 8:10 PM Yosry Muhammad 
>> wrote:
>>
>>> Hi,
>>>
>>> Please find attached a patch with the following bug fixes for the query
>>> tool:
>>> - View data not working correctly when the table/view does not contain
>>> any columns (#4492).
>>> - Query tool does not produce results when psycopg2 version is below 2.8
>>> (#4520).
>>> - Command tags and number of affected rows not shown in the query result
>>> messages (#4525 and #4529 - duplicates).
>>>
>>> Note that:
>>> #4524 and #4522 are feature requests for already existing features.
>>>
>>> Please review !
>>> Thanks
>>>
>>>
>>> --
>>> *Yosry Muhammad Yosry*
>>>
>>> Computer Engineering student,
>>> The Faculty of Engineering,
>>> Cairo University (2021).
>>> Class representative of CMP 2021.
>>> https://www.linkedin.com/in/yosrym93/
>>>
>>
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB India | 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
>


-- 
*Yosry Muhammad Yosry*

Computer Engineering student,
The Faculty of Engineering,
Cairo University (2021).
Class representative of CMP 2021.
https://www.linkedin.com/in/yosrym93/
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 4fe4d7da..5091c11d 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -399,17 +399,6 @@ def poll(trans_id):
 additional_messages = ''.join(messages)
 notifies = conn.get_notifies()
 
-# Procedure/Function output may comes in the form of Notices
-# from the database server, so we need to append those outputs
-# with the original result.
-if result is None:
-result = conn.status_message()
-if (result != 'SELECT 1' or result != 'SELECT 0') and \
-   result is not None and additional_messages:
-result = additional_messages + result
-else:
-result = None
-
 if st:
 if 'primary_keys' in session_obj:
 primary_keys = session_obj['primary_keys']
@@ -496,6 +485,7 @@ def poll(trans_id):
 col_info['pgadmin_alias'] = \
 re.sub("[%()]+", "|", col_name)
 session_obj['columns_info'] = columns
+
 # status of async_fetchmany_2darray is True and result is none
 # means nothing to fetch
 if result and rows_affected > -1:
@@ -516,6 +506,17 @@ def poll(trans_id):
 # restore it and update the session variable.
 update_session_grid_transaction(trans_id, session_obj)
 
+# Procedure/Function output may comes in the form of Notices
+# from the database server, so we need to append those outputs
+# with the original result.
+if result is None:
+result = conn.status_message()
+if result is not None and additional_messages is not None:
+result = additional_messages + result
+else:
+result = result if result is not None \
+else additional_messages
+
 elif status == ASYNC_EXECUTION_ABORTED:
 status = 'Cancel'
 else:
diff --git a/web/pgadmin/tools/sqleditor/tests/test_view_data.py b/web/pgadmin/tools/sqleditor/tests/test_view_data.py
index dc96f9cd..b02e0e90 100644
--- a/web/pgadmin/tools/sqleditor/tests/test_view_data.py
+++ b/web/pgadmin/tools/sqleditor/tests/test_view_data.py
@@ -33,7 +33,7 @@ class TestViewData(BaseTestGenerator):
 json_val json Not Null,
 Constraint table_pk Primary Key(id)
 );"

[pgAdmin][RM4489] Empty modal window

2019-07-31 Thread Aditya Toshniwal
Hi Hackers,

With the pull request https://github.com/EnterpriseDB/wcDocker/pull/11 merged,
updating the version for wcDocker will solve this issue. Attached is the
patch to update the version.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM4489.patch
Description: Binary data


[pgAdmin][RM4229] Missing "Copy" (and other edit menu items) from data panels

2019-07-31 Thread Aditya Toshniwal
Hi Hackers,

The pull request https://github.com/EnterpriseDB/wcDocker/pull/12 is
merged. This will limit the wcDocker context menu to frame/panel titles.
This pull request also changes the tab scroller icon from arrows to chevron
and fixing the position of the icons which are not centred currently.

Attached patch will update the version to accommodate the changes.
Please note, kindly commit "[pgAdmin][RM4489] Empty modal window" before
this and this patch is rebased on top of it.
"

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM4229.patch
Description: Binary data


Re: [pgAdmin][RM4489] Empty modal window

2019-07-31 Thread Aditya Toshniwal
Kindly ignore this patch. The version in this outdated and is updated to
latest in RM4229.

On Thu, Aug 1, 2019 at 10:36 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> With the pull request https://github.com/EnterpriseDB/wcDocker/pull/11 merged,
> updating the version for wcDocker will solve this issue. Attached is the
> patch to update the version.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Re: [pgAdmin][RM4229] Missing "Copy" (and other edit menu items) from data panels

2019-07-31 Thread Aditya Toshniwal
Hi Hackers,

Kindly ignore the previous patch. Attached it the updated patch to move
wcDocker to latest version.
This will also solve #4489 - Empty modal window.

On Thu, Aug 1, 2019 at 10:56 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> The pull request https://github.com/EnterpriseDB/wcDocker/pull/12 is
> merged. This will limit the wcDocker context menu to frame/panel titles.
> This pull request also changes the tab scroller icon from arrows to
> chevron and fixing the position of the icons which are not centred
> currently.
>
> Attached patch will update the version to accommodate the changes.
> Please note, kindly commit "[pgAdmin][RM4489] Empty modal window" before
> this and this patch is rebased on top of it.
> "
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM4229_v2.patch
Description: Binary data


pgAdmin 4 commit: Swap the Schema and Schemas icons and Catalog and Cat

2019-07-31 Thread Akshay Joshi
Swap the Schema and Schemas icons and Catalog and Catalogs icons that had been 
used the wrong way around.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1ff007d1cbde81498101951e122e70138060927b

Modified Files
--
.../databases/schemas/tables/triggers/static/img/coll-trigger.svg   | 2 +-
.../servers/databases/schemas/tables/triggers/static/img/trigger.svg| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Re: pgAdmin 4 commit: Swap the Schema and Schemas icons and Catalog and Cat

2019-07-31 Thread Akshay Joshi
Hi Hackers

I am extremely sorry for the wrong commit message. Correct commit message
is "*Swap the Trigger and Triggers icons that had been used the wrong way
around.*" I have tried to amend that message using git commit --amend
command but not able to push that for some reason.

On Thu, Aug 1, 2019 at 11:40 AM Akshay Joshi 
wrote:

> Swap the Schema and Schemas icons and Catalog and Catalogs icons that had
> been used the wrong way around.
>
> Branch
> --
> master
>
> Details
> ---
>
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1ff007d1cbde81498101951e122e70138060927b
>
> Modified Files
> --
> .../databases/schemas/tables/triggers/static/img/coll-trigger.svg   |
> 2 +-
> .../servers/databases/schemas/tables/triggers/static/img/trigger.svg|
> 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*