pgAdmin 4 commit: Fixed API test cases failed due to wrong handling of

2021-06-08 Thread Akshay Joshi
Fixed API test cases failed due to wrong handling of default binary path.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/types.py | 46 +++---
web/pgadmin/browser/server_groups/servers/utils.py |  2 +-
web/pgadmin/utils/__init__.py  | 41 ++-
web/regression/python_test_utils/test_utils.py | 16 +++-
4 files changed, 61 insertions(+), 44 deletions(-)



[pgAdmin][RM-6466]: Unable to add members in Login/Role group while creating it

2021-06-08 Thread Nikhil Mohite
Hi Hackers,

Please find the attached patch for RM-6466
:
Unable to add members in Login/Role group while creating it

-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* 
*Mob.No: +91-7798364578.*


RM_6466.patch
Description: Binary data


pgAdmin 4 commit: Added PSQL tool support for the Windows platform.

2021-06-08 Thread Akshay Joshi
Added PSQL tool support for the Windows platform.

Fixed following issues:
1. If the database name contains escape characters then PSQL unable to connect.
2. If the user terminates the connection by typing the 'exit' command, PSQL
   will show the connection termination msg.

Fixes #2341

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9f12747d9b68e9b497a8daeb19794985271018dc
Author: Nikhil Mohite 

Modified Files
--
requirements.txt   |   3 +-
.../browser/register_browser_preferences.py|  91 --
web/pgadmin/browser/static/js/collection.js|   2 +-
web/pgadmin/browser/static/js/node.js  |   2 +-
web/pgadmin/browser/static/js/toolbar.js   |   4 +-
web/pgadmin/browser/utils.py   |   3 +-
web/pgadmin/tools/psql/__init__.py | 190 +++--
web/pgadmin/tools/psql/static/js/psql_module.js|  14 +-
.../tools/psql/templates/editor_template.html  |  59 +++
web/regression/python_test_utils/test_utils.py |  13 +-
10 files changed, 219 insertions(+), 162 deletions(-)



Re: [pgAdmin][Patch] - Housekeeping #4622 - Add RE-SQL/MSQL test cases for Tables

2021-06-08 Thread Akshay Joshi
Hi Yogesh

Test cases are failing on EPAS/PG 9.5. Please fix and resend the patch.

On Tue, Jun 8, 2021 at 5:45 PM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hi,
>
> Please find patch which add re_sql & msql tests for table & sub nodes
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Ensure that the user should be able to add members in

2021-06-08 Thread Akshay Joshi
Ensure that the user should be able to add members in Login/Role group while 
creating it. Fixes #6466

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=93ddc4a5ba5faa997eb373526b4076525880531d
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/release_notes_5_4.rst   | 1 +
.../servers/roles/templates/roles/sql/9.1_plus/create.sql  | 7 +++
.../servers/roles/templates/roles/sql/9.4_plus/create.sql  | 7 +++
3 files changed, 15 insertions(+)



pgAdmin 4 commit: Added a mechanism to detect a corrupt/broken config d

2021-06-08 Thread Akshay Joshi
Added a mechanism to detect a corrupt/broken config database file. Fixes #6460

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=7c88ee7cff0dc168c6131b4e720e186e2b036e4e
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/release_notes_5_4.rst |  1 +
web/pgadmin/__init__.py  | 63 
web/pgadmin/browser/__init__.py  | 14 +++
web/pgadmin/browser/static/js/browser.js | 30 ++-
web/pgadmin/setup/__init__.py|  1 +
web/pgadmin/setup/db_table_check.py  | 32 
web/pgadmin/setup/db_version.py  |  5 ++-
7 files changed, 137 insertions(+), 9 deletions(-)



Re: [pgAdmin][RM-6466]: Unable to add members in Login/Role group while creating it

2021-06-08 Thread Akshay Joshi
Thanks, the patch applied.

On Tue, Jun 8, 2021 at 2:01 PM Nikhil Mohite 
wrote:

> Hi Hackers,
>
> Please find the attached patch for RM-6466
> :
> Unable to add members in Login/Role group while creating it
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Software Engineer.*
> *EDB Postgres* 
> *Mob.No: +91-7798364578.*
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM-6460]: Need a mechanism to detect a corrupt/broken config DB file.

2021-06-08 Thread Akshay Joshi
Thanks, the patch applied.

On Thu, Jun 3, 2021 at 3:52 PM Nikhil Mohite 
wrote:

> Hi Team,
>
> PFA updated patch (v2)
> On Thu, Jun 3, 2021 at 3:10 PM Nikhil Mohite <
> nikhil.moh...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Thu, Jun 3, 2021 at 2:49 PM Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Jun 3, 2021 at 10:01 AM Nikhil Mohite <
>>> nikhil.moh...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Thu, Jun 3, 2021 at 1:47 PM Dave Page  wrote:

> Hi
>
> On Thu, Jun 3, 2021 at 7:39 AM Nikhil Mohite <
> nikhil.moh...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch for RM-6460
>> :  Need a mechanism to
>> detect a corrupt/broken config DB file.
>>
>> 1. Added checks if all tables added in the model are present in
>> SQLite DB or not.
>> 2. If migrations fail it will backup older file and try migrations
>> with the newly created file.
>> (User will get notification on UI for the location of the backup file
>> and newly created.)
>> 3. If the user deleted any table from SQLite DB pgAdmin will not run
>> on the next restart and it will add the missing table list in the logs.
>>
>
> Surely if any tables have been deleted, it'll fail the check in point
> 1?
>
 Yes, but if the user deletes any table while pgAdmin is running then it
 will fail when the user tries to run pgAdmin next time.

>>>
>>> Right - but how is the end result of that different from a failed
>>> migration that left a table missing? Either way, the end result is the
>>> same, and should be handled the same way; i.e. backup/recreate the DB, then
>>> warn the user as soon as the UI is up.
>>>
>> Yes - It should be the same in both conditions, I will send an updated
>> patch for this.
>>
>
>>>
>>
>>> I believe the process is simple (and maybe this is what is done and this
>>> is just a language issue - I haven't read the patch in detail):
>>>
>>> - On startup, attempt to create the database/run any migrations as
>>> appropriate.
>>> - Check that all tables exist, and the schema version is correct.
>>> - If there's a problem, backup the file, create a new one from scratch,
>>> and warn the user.
>>>
>>> One thing I did notice when skimming the patch - we have this in the
>>> code:
>>>
>>> +raise RuntimeError(
>>> +'Specified SQLite database file is not valid.')
>>>
>>> The *user* didn't specify a SQLite database file (nor do they care that
>>> it's SQLite at this point). That (and any other similar messages) should
>>> probably be rephrased to say something like:
>>>
>>> "The configuration database file is not valid."
>>>
>>
>>> Thanks!
>>>
>>>
>>>
 (If we remove the table from the model it will not check particular
 table is present in DB or not. )

>
> --
> Dave Page
> Blog: https://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
> Regards,
 Nikhil Mohite.

>>>
>>>
>>> --
>>> Dave Page
>>> Blog: https://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EDB: https://www.enterprisedb.com
>>>
>>> Regards,
>> Nikhil Mohite
>>
> Regards,
> Nikhil Mohite
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*