Re: [GSoC] Ideas for the remaining of the project

2019-07-15 Thread Dave Page
Hi

On Mon, Jul 15, 2019 at 2:02 AM Yosry Muhammad  wrote:

> Hi Dave,
>
> The core patch for this project is being finalized and I am unable to work
> for the current few days due to issues mentioned in the previous email.
> Therefore, I have been thinking of what can be done in the project after
> this patch is done.
>
> Below are the features I have been thinking of with a short description
> (ordered by priority in my point of view):
>
> 1- Supporting tables that have OIDs rather than primary keys (I have a bit
> of research to do about OIDs and how they work).
>

They're going to need special treatment in 12+, but for older versions it's
quite simple; if they exist on a table, they can be considered a unique row
identifier.


>
> 2- Modifying the way table information is sent from the backend, and the
> way they are processed in the frontend.
>
> This will include (but is not limited to) modifying the columns info sent
> to the frontend to include:
> - Whether the column is a primary key (instead of matching by name at the
> frontend).
> - Whether the individual column is editable. This means there could be
> editable resultsets with read-only columns. It will allow for supporting a
> wider range of resultsets, such as: queries selecting some columns from a
> table in addition to an aggregation performed on one or more of the
> columns, queries with renamed columns, etc.
>
> It will also include modifying how columns info is handled in the frontend.
>

Sure - handling editable resultsets with read-only columns should
definitely be part of this project, and I agree that will mean altering the
way data is sent from the backend. It's important to keep it as efficient
as possible as well; with large resultsets we've found in the past that the
data size can be a real issue and previously worked on ways to improve
efficiency.


>
> 3- Mogirfying queries generated by pgAdmin during saving data changes to
> be able to display them in a meaningful way to the user. Moreover, a
> checkbox/preferences option is to be added to enable/disable showing them
> in the query history (to be discussed further upon implementation). This
> will involve modifying the cursor and connection wrapper classes in the
> backend to add a mogrify function wrapper in addition to other changes
> throughout the code.
>

Agreed; I think those three parts are very meaningful enhancements to the
work you've already done and will lead to a very successful GSoC project.

Let's get the final few tweaks done to the first patch, then move on. I'd
love to see that work committed this week.

Thanks - and keep up the good work!

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Add Reverse Engineered SQL tests for Types. Fixes #44

2019-07-15 Thread Dave Page
Add Reverse Engineered SQL tests for Types. Fixes #4468

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1dcf46cc5fd72dfb74e39c340398f5e857f8040a
Author: Murtuza Zabuawala 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |   1 +
.../types/templates/types/sql/default/update.sql   |   4 +-
.../alter_composite_type_acl_description.sql   |  20 +++
.../default/alter_composite_type_add_member.sql|  14 ++
.../default/alter_composite_type_remove_member.sql |  13 ++
.../default/alter_enum_type_acl_description.sql|  16 ++
.../types/tests/default/alter_enum_type_label.sql  |   9 +
.../default/alter_range_type_acl_description.sql   |  19 +++
.../default/alter_shell_type_acl_description.sql   |  11 ++
.../types/tests/default/create_composite_type.sql  |  13 ++
.../types/tests/default/create_enum_type.sql   |   9 +
.../types/tests/default/create_range_type.sql  |  12 ++
.../types/tests/default/create_shell_type.sql  |   8 +
.../schemas/types/tests/default/tests.json | 185 +
web/regression/re_sql/tests/test_resql.py  |  10 +-
15 files changed, 341 insertions(+), 3 deletions(-)



Re: [RM#4468] Add RE-SQL tests for Type node

2019-07-15 Thread Dave Page
Thanks, patch applied.

On Mon, Jul 15, 2019 at 7:57 AM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find patch for RE-SQL type node.
>
> - Fixed a bug in update.sql which is found during writing tests
> - Added logging for JSON file when it fails to load
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: 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


[RM#4468] Consistently use ROLE keyword when generating RE-SQL

2019-07-15 Thread Murtuza Zabuawala
Hi,

Please find attached patch which will change the keyword USER to ROLE when
generating RE-SQL.

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


RM_4446.diff
Description: Binary data


pgAdmin 4 commit: Use ROLE consistently when generating RE-SQL for role

2019-07-15 Thread Dave Page
Use ROLE consistently when generating RE-SQL for roles, not USER. Fixes #4446

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1831c9e70af15762cbf812a1e44ce9bc15fe726c
Author: Murtuza Zabuawala 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  1 +
.../roles/templates/roles/sql/9.1_plus/create.sql  |  2 +-
.../servers/roles/templates/roles/sql/9.1_plus/sql.sql |  9 -
.../roles/templates/roles/sql/9.1_plus/update.sql  |  4 ++--
.../roles/templates/roles/sql/9.4_plus/create.sql  |  2 +-
.../servers/roles/templates/roles/sql/9.4_plus/sql.sql |  9 -
.../roles/templates/roles/sql/9.4_plus/update.sql  |  4 ++--
...escription.sql => alter_login_role_description.sql} |  6 +++---
.../{alter_user_name.sql => alter_login_role_name.sql} |  6 +++---
...r_user_options.sql => alter_login_role_options.sql} |  6 +++---
.../{create_user.sql => create_login_role.sql} |  6 +++---
.../servers/roles/tests/9.1_plus/test.json | 18 +-
...escription.sql => alter_login_role_description.sql} |  6 +++---
.../{alter_user_name.sql => alter_login_role_name.sql} |  6 +++---
...r_user_options.sql => alter_login_role_options.sql} |  6 +++---
.../servers/roles/tests/9.4_plus/create_login_role.sql | 10 ++
.../servers/roles/tests/9.4_plus/create_user.sql   | 10 --
.../servers/roles/tests/9.4_plus/test.json | 18 +-
18 files changed, 64 insertions(+), 65 deletions(-)



Re: [RM#4468] Consistently use ROLE keyword when generating RE-SQL

2019-07-15 Thread Dave Page
Thanks, committed.

On Mon, Jul 15, 2019 at 11:11 AM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch which will change the keyword USER to ROLE when
> generating RE-SQL.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: 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


RE-SQL tests patch for FTS parsers node

2019-07-15 Thread Shubham Agarwal
Hi Team,

PFA patch for RE-SQL tests cases for FTS parsers node.

-- 
Thanks & Regards,
Shubham Agarwal
EnterpriseDB Corporation

The Postgres Database Company


resql_fts_parser.patch
Description: Binary data


pgAdmin 4 commit: Add Reverse Engineered SQL tests for FTS Parsers. Fix

2019-07-15 Thread Dave Page
Add Reverse Engineered SQL tests for FTS Parsers. Fixes #4471

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=809e0682bd0c70c49833ae67e6ffd58ec440d9fe
Author: Shubham Agarwal 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  2 ++
.../fts_parsers/tests/default/alter_fts_parser.sql | 13 +++
.../tests/default/create_fts_parser.sql| 13 +++
.../schemas/fts_parsers/tests/default/test.json| 40 ++
web/regression/re_sql/tests/test_resql.py  | 12 +--
5 files changed, 77 insertions(+), 3 deletions(-)



Re: RE-SQL tests patch for FTS parsers node

2019-07-15 Thread Dave Page
Thanks, applied.

On Mon, Jul 15, 2019 at 11:42 AM Shubham Agarwal <
shubham.agar...@enterprisedb.com> wrote:

> Hi Team,
>
> PFA patch for RE-SQL tests cases for FTS parsers node.
>
> --
> Thanks & Regards,
> Shubham Agarwal
> EnterpriseDB Corporation
>
> The Postgres Database Company
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


[pgAdmin][RM4469] Add RE-SQL test cases for Sequences

2019-07-15 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to add RE-SQL test cases for sequences. When running
the test cases, I also found an issue (#4470
). The fix for it is included
in the patch.

Kindly review.

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


RM4469_4470.patch
Description: Binary data


Re: [RM#4468] Add RE-SQL tests for Type node

2019-07-15 Thread Murtuza Zabuawala
Hi Dave,

PFA patch to fix the ACL order so that it RE-SQL tests for type node works
consistently on all the platforms.

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



On Mon, Jul 15, 2019 at 2:55 PM Dave Page  wrote:

> Thanks, patch applied.
>
> On Mon, Jul 15, 2019 at 7:57 AM Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find patch for RE-SQL type node.
>>
>> - Fixed a bug in update.sql which is found during writing tests
>> - Added logging for JSON file when it fails to load
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: 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
>


fix_acl_order.diff
Description: Binary data


[pgAdmin4][Patch]: RM 4428 and 4448

2019-07-15 Thread Akshay Joshi
Hi Hackers,

Attached is the patch to fix following issues in pgagent module:

   - RM 4428 "malformed array literal error when updating pgagent job".
   - RM 4448 "Error when updating connection string in pgagent Jobs."
   - When user create a schedule using Create->Schedule dialog browser tree
   is not showing newly created node.
   - Properties tab showing same properties for all the created schedule.
   - Added validation in "pga_jobstep.js", throws error on browser when we
   modify step from the pgagent dialog and select the same node.


Added regression test cases to add schedule and step from the pgagent job
itself.
Please review it.

-- 
*Thanks & Regards*
*Akshay Joshi*

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


RM_4428_4448.patch
Description: Binary data


pgAdmin 4 commit: Stabilise ordering of ACLs in Type RE-SQL tests to pr

2019-07-15 Thread Dave Page
Stabilise ordering of ACLs in Type RE-SQL tests to prevent random failures.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f4453e33cc28d8ee9e98848b5de6ac41b9444297
Author: Murtuza Zabuawala 

Modified Files
--
.../databases/schemas/types/templates/types/sql/default/acl.sql   | 1 +
.../types/tests/default/alter_composite_type_acl_description.sql  | 4 ++--
.../schemas/types/tests/default/alter_enum_type_acl_description.sql   | 4 ++--
.../schemas/types/tests/default/alter_range_type_acl_description.sql  | 4 ++--
4 files changed, 7 insertions(+), 6 deletions(-)



Re: [RM#4468] Add RE-SQL tests for Type node

2019-07-15 Thread Dave Page
Thanks, applied.

On Mon, Jul 15, 2019 at 1:16 PM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> PFA patch to fix the ACL order so that it RE-SQL tests for type node works
> consistently on all the platforms.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
>
> On Mon, Jul 15, 2019 at 2:55 PM Dave Page  wrote:
>
>> Thanks, patch applied.
>>
>> On Mon, Jul 15, 2019 at 7:57 AM Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find patch for RE-SQL type node.
>>>
>>> - Fixed a bug in update.sql which is found during writing tests
>>> - Added logging for JSON file when it fails to load
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: 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 4 commit: Fix sequence reverse engineered SQL generation with q

2019-07-15 Thread Dave Page
Fix sequence reverse engineered SQL generation with quoted names on PG/EPAS 
10+. Fixes #4470

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0b82a4ad92f257a623f919e1115e911212dd77ca
Author: Aditya Toshniwal 

Modified Files
--
docs/en_US/release_notes_4_11.rst  | 3 ++-
.../schemas/sequences/templates/sequences/sql/10_plus/get_def.sql  | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Add Reverse Engineered SQL tests for Sequences. Fixes

2019-07-15 Thread Dave Page
Add Reverse Engineered SQL tests for Sequences. Fixes #4469

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d3ef1137d9c330b979e92b6d2d8ba1e8ac5d566d
Author: Aditya Toshniwal 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  2 +-
.../tests/pg/10_plus/alter_seq_comment.sql | 16 +++
.../sequences/tests/pg/10_plus/alter_seq_props.sql | 17 
.../sequences/tests/pg/10_plus/create_sequence.sql | 13 ++
.../schemas/sequences/tests/pg/10_plus/test.json   | 49 ++
.../tests/pg/default/alter_seq_comment.sql | 16 +++
.../sequences/tests/pg/default/alter_seq_props.sql | 17 
.../sequences/tests/pg/default/create_sequence.sql | 13 ++
.../schemas/sequences/tests/pg/default/test.json   | 49 ++
9 files changed, 191 insertions(+), 1 deletion(-)



Re: [pgAdmin][RM4469] Add RE-SQL test cases for Sequences

2019-07-15 Thread Dave Page
Thanks, committed.

On Mon, Jul 15, 2019 at 12:06 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to add RE-SQL test cases for sequences. When running
> the test cases, I also found an issue (#4470
> ). The fix for it is included
> in the patch.
>
> Kindly review.
>
> --
> 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


pgAdmin 4 commit: pgAgent fixes:

2019-07-15 Thread Dave Page
pgAgent fixes:

"malformed array literal error when updating pgagent job". Fixes #4428
"Error when updating connection string in pgagent Jobs.". Fixes #4448
When user create a schedule using Create->Schedule dialog browser tree is not 
showing newly created node.
Properties tab showing same properties for all the created schedule.
Added validation in "pga_jobstep.js", throws error on browser when we modify 
step from the pgagent dialog and select the same node.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ab87035658cc1071f4e6c43430d09821d7607944
Author: Akshay Joshi 

Modified Files
--
docs/en_US/release_notes_4_11.rst  |  2 +
.../server_groups/servers/pgagent/__init__.py  | 52 ++
.../servers/pgagent/schedules/__init__.py  | 56 ++-
.../pgagent/schedules/static/js/pga_schedule.js|  3 +-
.../servers/pgagent/steps/static/js/pga_jobstep.js | 11 +--
.../templates/pga_job/sql/pre3.4/update.sql| 12 +++-
.../templates/pga_schedule/sql/pre3.4/create.sql   |  4 +-
.../pga_schedule/sql/pre3.4/properties.sql |  2 +-
.../servers/pgagent/tests/test_pgagent_add.py  |  3 +-
.../servers/pgagent/tests/test_pgagent_put.py  | 79 --
.../browser/server_groups/servers/pgagent/utils.py | 46 +
11 files changed, 204 insertions(+), 66 deletions(-)



Re: [pgAdmin4][Patch]: RM 4428 and 4448

2019-07-15 Thread Dave Page
Thanks, applied.

On Mon, Jul 15, 2019 at 1:32 PM Akshay Joshi 
wrote:

> Hi Hackers,
>
> Attached is the patch to fix following issues in pgagent module:
>
>- RM 4428 "malformed array literal error when updating pgagent job".
>- RM 4448 "Error when updating connection string in pgagent Jobs."
>- When user create a schedule using Create->Schedule dialog browser
>tree is not showing newly created node.
>- Properties tab showing same properties for all the created schedule.
>- Added validation in "pga_jobstep.js", throws error on browser when
>we modify step from the pgagent dialog and select the same node.
>
>
> Added regression test cases to add schedule and step from the pgagent job
> itself.
> Please review it.
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Cleanup wording.

2019-07-15 Thread Dave Page
Cleanup wording.

Branch
--
master

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

Modified Files
--
web/regression/re_sql/tests/test_resql.py | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



[pgAdmin4][Patch] - RE-SQL and modified SQL tests for Check Constraint node

2019-07-15 Thread Khushboo Vashi
Hi,

Please find the attached patch for the RE-SQL and modified SQL tests for
check constraint node.

For the table child nodes, *create table endpoint *with proper data is
required in the JSON file.
I have introduced one new parameter named *store_table_id* in the table
create endpoint, so the created table ID will be stored for the rest of the
scenarios.

Thanks,
Khushboo


resql_check_constraint.patch
Description: Binary data