Re: pgAdmin is freezing

2020-04-20 Thread Nagaraj Raj
Yes, its same for all objects in the database.

Thanks,Rj

Sent from Yahoo Mail for iPhone


On Sunday, April 19, 2020, 8:01 PM, Khushboo Vashi 
 wrote:

Hi,
On Sat, Apr 18, 2020 at 1:41 AM Nagaraj Raj  wrote:

Hi,
pgAdmin is freezing for other activities when dropping any table or index if 
command is held because of any lock occurring. In this state unable to access 
any other objects like stats, SQL statements, descriptions or query tool for 
other objects. pgAdmin resume to start working fine after either releasing lock 
or killed the process in the server.Is it a bug or its know behavior of pgAdmin?

If a particular table/index is locked and you are trying to fetch the details 
for the same object then I think this is the expected behaviour but at the same 
time if you can not access the details of the other database objects then it's 
a bug.
Thanks,Khushboo
Currently, I'm using the latest version pgAdmin 4 v4.20.


Thanks,Rj 








[pgAdmin][RM5401] Object name does not displayed in search object if object name contains special characters

2020-04-20 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix the issue in search objects where object name
does not display correctly if it html characters.
Code is changed to escape the HTML chars in Object name and path. Code is
also changed to escape single quotes in the like clause of the search query.

Please review.

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


RM5401.patch
Description: Binary data


[pgAdmin][RM5415] Query tool context menu on collection nodes not working

2020-04-20 Thread Aditya Toshniwal
Hi Hackers,

Attached is a small fix to make the query tool context menu on collection
node work.
Please review.

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


RM5415.patch
Description: Binary data


Re: [pgAdmin][RM4946] Issue with temporary tables on commit drop as.

2020-04-20 Thread Amol Vyavahare
Thanks for the feedback.

1. The test case is particularly written for Temporary table with Commit
Drop, so please mention it in the comments.
*- Done*

2. Also, the class TestQueryUpdatableResultset is been inherited, so no
need to repeat the same methods, for example: setUp, _execute_select_sql,
tearDown
*- Done, some minor changes were done to make this change*

Please find the updated patch attached herewith.

On Mon, Apr 20, 2020 at 8:56 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Amol,
>
> The patch is working fine and looks good to me however some code related
> review comments:
>
> 1. The test case is particularly written for Temporary table with Commit
> Drop, so please mention it in the comments.
> 2. Also, the class TestQueryUpdatableResultset is been inherited, so no
> need to repeat the same methods, for example: setUp, _execute_select_sql,
> tearDown
>
>
> Thanks,
> Khushboo
>
>
> On Fri, Apr 17, 2020 at 3:49 PM Amol Vyavahare <
> amol.vyavah...@enterprisedb.com> wrote:
>
>> Hi Khushboo,
>>
>> Please find attached the updated patch with the latest changes as
>> suggested along with API test cases for the RM4946 issue fix.
>>
>> Thank You.
>>
>> On Wed, Apr 15, 2020 at 2:26 PM Amol Vyavahare <
>> amol.vyavah...@enterprisedb.com> wrote:
>>
>>> Sure, will do that.
>>>
>>> On Wed, Apr 15, 2020 at 1:33 PM Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi Amol,

 On Wed, Apr 15, 2020 at 12:06 PM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> I am reviewing this patch.
>
> Thanks,
> Khushboo
>
> On Wed, Apr 15, 2020 at 11:45 AM Amol Vyavahare <
> amol.vyavah...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>> Attached is the patch to fix the Issue with temporary tables on
>> commit drop as. This patch fixes the issue where an error was thrown when
>> the user tried to create a temporary table via query tool and no result
>> was displayed when the query was executed.
>>
>> Please review.
>>
>> Please write the API test cases for the same even if the changes are
 very small but they are in the SQL Editor backend code.
 The patch is working fine and looks good to me.

 Thanks,
 Khushboo

> --
>> *Regards,*
>> *Amol Vyavahare*
>> *E**nterpriseDB Corporation*
>> The Enterprise Postgres Company
>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>> [image: EDB Postgres] Unit 301 A, Third
>> Floor, Godrej Castlemaine,
>> 155, Sassoon Road, Pune, MH - 411001
>> [image: Blog Feed]  [image: Facebook]
>>  [image: Twitter]
>>  [image: LinkedIn]
>>  [image: Google+]
>> 
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>>
>>
>>
>>>
>>> --
>>> *Regards,*
>>> *Amol Vyavahare*
>>> *E**nterpriseDB Corporation*
>>> The Enterprise Postgres Company
>>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>>> [image: EDB Postgres] Unit 301 A, Third
>>> Floor, Godrej Castlemaine,
>>> 155, Sassoon Road, Pune, MH - 411001
>>> [image: Blog Feed]  [image: Facebook]
>>>  [image: Twitter]
>>>  [image: LinkedIn]
>>>  [image: Google+]
>>> 
>>> Website: www.enterprisedb.com
>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>
>>>
>>>
>>>
>>
>> --
>> *Regards,*
>> *Amol Vyavahare*
>> *E**nterpriseDB Corporation*
>> The Enterprise Postgres Company
>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>> [image: EDB Postgres] Unit 301 A, Third
>> Floor, Godrej Castlemaine,
>> 155, Sassoon Road, Pune, MH - 411001
>> [image: Blog Feed]  [image: Facebook]
>>  [image: Twitter]
>>  [image: LinkedIn]
>>  [image: Google+]
>> 
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>>
>>
>>

-- 
*Regards,*
*Amol Vyavahare*
*E**nterpriseDB Corporation*
The Enterprise Postgres Company
*T: +91 20 6644 9600, M: +91 738 738 2128*
[image: EDB Postgres] Unit 301 A, Third Floor,
Godrej Castlemaine,
155, Sassoon Road, Pune, MH - 411001
[image: Blog Feed] 

[Patch][pgAdmin4]: Fix pgagent issues

2020-04-20 Thread Neel Patel
Hi,

Please find the attached patch to stabilize the pgagent and fix below
issues.

   - Reverse engineering SQL and MSQL was incorrect when the user added a
   job schedule with exception Fixes #5356
   - Job schedule exception time was not showing correctly in SQL tab.
   - Identify the job step and schedule if disabled from browser tree, same
   as pgagent job - Fixes #4636
   - Add RE-SQL/MSQL test cases for pgAgent Jobs - Fixes #4623

Do review it and let me know for comments.

Thanks,
Neel Patel
diff --git a/docs/en_US/release_notes_4_21.rst b/docs/en_US/release_notes_4_21.rst
index d2a42eb..9f152ee 100644
--- a/docs/en_US/release_notes_4_21.rst
+++ b/docs/en_US/release_notes_4_21.rst
@@ -11,6 +11,7 @@ New features
 
 | `Issue #2172 `_ -  Added search object functionality.
 | `Issue #2186 `_ -  Added LDAP authentication support.
+| `Issue #4636 `_ -  Added job step and job schedule disable icons to identify it quickly within browser tree.
 | `Issue #5181 `_ -  Added support for parameter toast_tuple_target and parallel_workers of the table.
 | `Issue #5263 `_ -  Added support of Foreign Tables to the Schema Diff.
 | `Issue #5264 `_ -  Added support of Packages, Sequences and Synonyms to the Schema Diff.
@@ -21,6 +22,7 @@ Housekeeping
 
 
 | `Issue #4620 `_ -  Add Reverse Engineered and Modified SQL tests for procedures.
+| `Issue #4623 `_ -  Add Reverse Engineered and Modified SQL tests for pgagent jobs.
 
 Bug fixes
 *
@@ -57,6 +59,7 @@ Bug fixes
 | `Issue #5302 `_ -  Fixed an issue where difference SQL is not seen in the schema diff tool for Types.
 | `Issue #5314 `_ -  Ensure that switch cell is in sync with switch control for accessibility.
 | `Issue #5351 `_ -  Fixed compilation warnings while building pgAdmin.
+| `Issue #5356 `_ -  Fixed msql creation issue while adding exception in pgaagent job schedule.
 | `Issue #5361 `_ -  Fixes an issue where pgAdmin4 GUI does not display properly in IE 11.
 | `Issue #5362 `_ -  Fixed an issue where the identical packages and sequences visible as different in the schema diff tool.
 | `Issue #5366 `_ -  Added alert message to Reset Layout if any of the panels from Query Tool failed to load.
@@ -66,4 +69,4 @@ Bug fixes
 | `Issue #5387 `_ -  Fixed an issue where the mode is not shown in the properties dialog of functions/procedures if all the arguments are "IN" arguments.
 | `Issue #5400 `_ -  Fixed internal server error when the database server is logged in with non-super user.
 | `Issue #5409 `_ -  Fixed validation issue in Synonyms node.
-| `Issue #5410 `_ -  Fixed an issue while removing the package body showing wrong modified SQL.
\ No newline at end of file
+| `Issue #5410 `_ -  Fixed an issue while removing the package body showing wrong modified SQL.
diff --git a/web/pgadmin/browser/server_groups/servers/pgagent/__init__.py b/web/pgadmin/browser/server_groups/servers/pgagent/__init__.py
index 797a6cb..ee87a1a 100644
--- a/web/pgadmin/browser/server_groups/servers/pgagent/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/pgagent/__init__.py
@@ -10,6 +10,7 @@
 """Implements the pgAgent Jobs Node"""
 from functools import wraps
 import json
+from datetime import datetime, time
 
 from flask import render_template, request, jsonify
 from flask_babelex import gettext as _
@@ -323,7 +324,8 @@ SELECT EXISTS(
 row['jobid'],
 sid,
 row['jobname'],
-icon="icon-pga_job"
+icon="icon-pga_job" if row['jobenabled']
+else "icon-pga_job-disabled"
 )
 )
 
@@ -500,6 +502,10 @@ SELECT EXISTS(
 if schedule['jexid']:
 idx = 0
 for exc in schedule['jexid']:
+# Convert datetime.time object to string
+if isinstance(schedule['jextime'][idx], time):
+schedule['jextime'][idx] = \
+schedule['jextime'][idx].strftime("%H:%M:%S")
 schedule['jscexceptions'].append({
 'jexid': exc,

pgAdmin 4 commit: Some more gettext() usage fixes:

2020-04-20 Thread Akshay Joshi
Some more gettext() usage fixes:
  - fixed `%` vs. `.format()`
  - unified texts and usage `%s` vs. `{}`/`{0}`
  - improved text sentences for translate
  - added gettext for next texts

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=36a3d4e53b6338dd66dcac6fcffa441c1dd37a74
Author: Libor M 

Modified Files
--
web/pgadmin/__init__.py  |  4 ++--
.../servers/databases/event_triggers/__init__.py |  4 ++--
.../servers/databases/schemas/domains/__init__.py|  5 ++---
.../schemas/domains/domain_constraints/__init__.py   |  5 ++---
.../databases/schemas/foreign_tables/__init__.py |  5 ++---
.../static/js/fts_configuration.js   |  2 +-
.../databases/schemas/fts_dictionaries/__init__.py   |  3 ++-
.../servers/databases/schemas/functions/__init__.py  |  5 ++---
.../servers/databases/schemas/packages/__init__.py   |  5 +++--
.../servers/databases/schemas/sequences/__init__.py  |  8 
.../databases/schemas/tables/rules/__init__.py   |  4 ++--
.../databases/schemas/tables/triggers/__init__.py|  5 ++---
.../servers/pgagent/steps/static/js/pga_jobstep.js   |  3 +--
.../servers/templates/servers/password.html  |  2 +-
.../servers/templates/servers/tunnel_password.html   |  2 +-
web/pgadmin/browser/static/js/browser.js |  2 +-
web/pgadmin/misc/file_manager/static/js/utility.js   |  2 +-
web/pgadmin/misc/static/explain/js/explain.js| 20 ++--
web/pgadmin/static/js/backgrid.pgadmin.js|  4 ++--
.../js/sqleditor/history/query_history_details.js|  2 +-
.../static/vendor/backgrid/backgrid-select-all.js|  2 +-
.../static/js/search_objects_dialog_wrapper.js   |  8 +++-
22 files changed, 48 insertions(+), 54 deletions(-)



pgAdmin 4 commit: Ensure that the query tool context menu should work o

2020-04-20 Thread Akshay Joshi
Ensure that the query tool context menu should work on the collection nodes. 
Fixes #5415

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_21.rst   |  3 ++-
web/pgadmin/browser/static/js/collection.js | 15 ---
2 files changed, 14 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Fixed search object issue when the object name contai

2020-04-20 Thread Akshay Joshi
Fixed search object issue when the object name contains special characters. 
Fixes #5401

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_21.rst|  1 +
.../static/js/search_objects_dialog_wrapper.js   | 12 +---
web/pgadmin/tools/search_objects/utils.py|  3 +++
.../search_objects/search_objects_dialog_wrapper_spec.js |  2 ++
4 files changed, 15 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Fixed an issue where schema diff marks an identical t

2020-04-20 Thread Akshay Joshi
Fixed an issue where schema diff marks an identical table as different. Fixes 
#5350
Fixed an issue where schema diff showing changes in the identical domain 
constraints. Fixes #5315

Ignore the keys from the source and target list and also sort both the lists.

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_21.rst  |  2 +
.../databases/schemas/foreign_tables/__init__.py   |  4 +-
.../templates/mviews/pg/9.3_plus/sql/delete.sql|  2 +-
.../templates/mviews/pg/9.4_plus/sql/delete.sql|  2 +-
.../templates/mviews/ppas/9.3_plus/sql/delete.sql  |  2 +-
.../static/vendor/backgrid/backgrid-select-all.js  |  4 +-
web/pgadmin/tools/schema_diff/directory_compare.py | 98 +-
.../tools/schema_diff/tests/pg/10_plus/source.sql  | 17 
.../tools/schema_diff/tests/pg/10_plus/target.sql  | 17 
.../tools/schema_diff/tests/pg/11_plus/source.sql  | 17 
.../tools/schema_diff/tests/pg/11_plus/target.sql  | 17 
.../tools/schema_diff/tests/pg/12_plus/source.sql  | 17 
.../tools/schema_diff/tests/pg/12_plus/target.sql  | 17 
.../tools/schema_diff/tests/pg/9.2_plus/source.sql | 17 
.../tools/schema_diff/tests/pg/9.2_plus/target.sql | 17 
.../schema_diff/tests/ppas/10_plus/source.sql  | 17 
.../schema_diff/tests/ppas/10_plus/target.sql  | 17 
.../schema_diff/tests/ppas/9.2_plus/source.sql | 17 
.../schema_diff/tests/ppas/9.2_plus/target.sql | 17 
19 files changed, 290 insertions(+), 28 deletions(-)



pgAdmin 4 commit: Fixed an issue when the user creates a temporary tabl

2020-04-20 Thread Akshay Joshi
Fixed an issue when the user creates a temporary table with 'on commit drop as' 
clause. Fixes #4946

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f282b2688397e461fcc181befcb18970f3ba280f
Author: Amol Vyavahare 

Modified Files
--
docs/en_US/release_notes_4_21.rst  |  1 +
.../utils/is_query_resultset_updatable.py  |  5 +-
.../tests/test_is_query_resultset_updatable.py | 87 +++---
3 files changed, 66 insertions(+), 27 deletions(-)



pgAdmin 4 commit: Fixed an issue where the search object module unable

2020-04-20 Thread Akshay Joshi
Fixed an issue where the search object module unable to locate the object in 
the browser tree. Fixes #5396

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_21.rst  |  1 +
.../static/js/search_objects_dialog_wrapper.js | 11 +++-
.../search_objects/sql/pg/10_plus/search.sql   | 45 +
.../search_objects/sql/pg/11_plus/search.sql   | 45 +
.../search_objects/sql/pg/default/search.sql   | 18 ++---
.../search_objects/sql/ppas/10_plus/search.sql | 76 --
.../search_objects/sql/ppas/12_plus/search.sql | 60 +++--
.../search_objects/sql/ppas/default/search.sql | 56 
.../search_objects_dialog_wrapper_spec.js  |  6 +-
9 files changed, 212 insertions(+), 106 deletions(-)



pgAdmin 4 commit: Fixed an issue where the checkbox is not visible on C

2020-04-20 Thread Akshay Joshi
Fixed an issue where the checkbox is not visible on Configuration dialog in 
runtime for the dark theme. Fixes #5402

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b0b60da84acf13250238d63b724b5265f6bfc4c0
Author: Neel Patel 

Modified Files
--
Make.bat  | 1 +
docs/en_US/release_notes_4_21.rst | 1 +
pkg/mac/build.sh  | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)



Re: pgAdmin 4 - next gettext usage fixes

2020-04-20 Thread Akshay Joshi
Thanks, patch applied.

On Sun, Apr 19, 2020 at 5:50 PM Libor M.  wrote:

> Hi,
> I sending patch for slightly modified the use of gettext:
> - fixed `%` vs. `.format()`
> - unified texts and usage `%s` vs. `{}`/`{0}`
> - improved text sentences for translate
> - added gettext for next texts
>
> Best regards,
>
> Libor M.
>
> E-mail: libor...@gmail.com
> GitHub: https://github.com/liborm85
>
> čt 16. 4. 2020 v 9:51 odesílatel Akshay Joshi
>  napsal:
> >
> > Thanks, patch applied.
> >
> > On Wed, Apr 15, 2020 at 5:17 PM Libor M.  wrote:
> >>
> >> Hi,
> >> next minor gettext and format fixes in patch.
> >>
> >> Best regards,
> >>
> >> Libor M.
> >>
> >> E-mail: libor...@gmail.com
> >> GitHub: https://github.com/liborm85
> >>
> >> st 15. 4. 2020 v 13:17 odesílatel Akshay Joshi
> >>  napsal:
> >> >
> >> > Thanks, patch applied.
> >> >
> >> > On Wed, Apr 15, 2020 at 2:55 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> Please find the updated patch.
> >> >>
> >> >> On Wed, Apr 15, 2020 at 1:33 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
> >> >>>
> >> >>> Hi Aditya
> >> >>>
> >> >>> I think the fix is incorrect. .format method should be applied
> after gettext() like gettext().format(). Please check for other places too
> and send the updated patch.
> >> >>>
> >> >>> On Wed, Apr 15, 2020 at 11:38 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
> >> 
> >>  Hi Hackers/Libor,
> >> 
> >>  The changes like below are incorrect. Try "Count rows" from a
> table's context menu.
> >> 
> >>  -info=gettext("Table rows counted: %s" % count),
> >> 
> >>  +info=gettext("Table rows counted: %s") % count,
> >> 
> >> 
> >>  Attached is the patch to fix all such changes in pgAdmin, to use
> format() instead.
> >>  Please review.
> >> 
> >>  On Fri, Apr 10, 2020 at 2:57 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
> >> >
> >> > Hi Libor
> >> >
> >> > Thanks, patch applied. Please make sure to run the PEP8 checks
> before sending the patch.
> >> > I have fixed and committed the code.
> >> >
> >> > On Wed, Apr 8, 2020 at 9:30 PM Libor M. 
> wrote:
> >> >>
> >> >> Hello,
> >> >> I fixed next gettext usage:
> >> >>
> >> >> - fixed gettext usage with .format() only for original text with
> %s
> >> >> - fixed typos
> >> >> - fixed translation yes/no buttons in dialog
> >> >> - improved translating sentences without "connecting" words (eg.
> see
> >> >> web/pgadmin/dashboard/static/js/dashboard.js, word 'cancel'
> needs to
> >> >> be translated in Czech language as 'zrušit' but in another
> sentence as
> >> >> 'zrušení')
> >> >> - added gettext for text translations
> >> >>
> >> >> Diff file is attached.
> >> >>
> >> >> Best regards,
> >> >>
> >> >> Libor M.
> >> >>
> >> >> E-mail: libor...@gmail.com
> >> >> GitHub: https://github.com/liborm85
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks & Regards
> >> > Akshay Joshi
> >> > Sr. Software Architect
> >> > EnterpriseDB Software India Private Limited
> >> > Mobile: +91 976-788-8246
> >> 
> >> 
> >> 
> >>  --
> >>  Thanks and Regards,
> >>  Aditya Toshniwal
> >>  pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> >>  "Don't Complain about Heat, Plant a TREE"
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Thanks & Regards
> >> >>> Akshay Joshi
> >> >>> Sr. Software Architect
> >> >>> EnterpriseDB Software India Private Limited
> >> >>> Mobile: +91 976-788-8246
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Thanks and Regards,
> >> >> Aditya Toshniwal
> >> >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> >> >> "Don't Complain about Heat, Plant a TREE"
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks & Regards
> >> > Akshay Joshi
> >> > Sr. Software Architect
> >> > EnterpriseDB Software India Private Limited
> >> > Mobile: +91 976-788-8246
> >
> >
> >
> > --
> > Thanks & Regards
> > Akshay Joshi
> > Sr. Software Architect
> > EnterpriseDB Software India Private Limited
> > Mobile: +91 976-788-8246
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


Re: [pgAdmin][RM5396] Unable to locate this object in the browser in search objects

2020-04-20 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Apr 20, 2020 at 11:36 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> Attached is the updated patch to also make required changes in the test
> cases.
> Please review.
>
> On Mon, Apr 20, 2020 at 11:28 AM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Aditya
>>
>> Jasmine tests are failing. Please fix and resend the patch.
>>
>> On Fri, Apr 17, 2020 at 6:49 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to fix the issues raised in the RM and other
>>> issues which I encountered while fixing. Following are the details:
>>> 1) Not able to locate indexes, trigger under partition of partitioned
>>> table.
>>> 2) Not able to locate columns under catalog schemas other than
>>> pg_catalog.
>>> 3) Not able to locate foreign keys.
>>> 4) Not able to locate rules under a view.
>>> 5) Not able to locate user mapping
>>> 6) Rules of materialized view and Types from dbms_* packages on EPAS
>>> servers should not be listed in search objects as they are not visible
>>> in the browser tree.
>>>
>>> Please review.
>>>
>>> --
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>>
>> *Sr. Software Architect*
>> *EnterpriseDB Software India Private Limited*
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


Re: [pgAdmin][RM5401] Object name does not displayed in search object if object name contains special characters

2020-04-20 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Apr 20, 2020 at 1:49 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix the issue in search objects where object name
> does not display correctly if it html characters.
> Code is changed to escape the HTML chars in Object name and path. Code is
> also changed to escape single quotes in the like clause of the search query.
>
> Please review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


Re: [pgAdmin][RM4946] Issue with temporary tables on commit drop as.

2020-04-20 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Apr 20, 2020 at 2:38 PM Amol Vyavahare <
amol.vyavah...@enterprisedb.com> wrote:

> Thanks for the feedback.
>
> 1. The test case is particularly written for Temporary table with Commit
> Drop, so please mention it in the comments.
> *- Done*
>
> 2. Also, the class TestQueryUpdatableResultset is been inherited, so no
> need to repeat the same methods, for example: setUp, _execute_select_sql,
> tearDown
> *- Done, some minor changes were done to make this change*
>
> Please find the updated patch attached herewith.
>
> On Mon, Apr 20, 2020 at 8:56 AM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Amol,
>>
>> The patch is working fine and looks good to me however some code related
>> review comments:
>>
>> 1. The test case is particularly written for Temporary table with Commit
>> Drop, so please mention it in the comments.
>> 2. Also, the class TestQueryUpdatableResultset is been inherited, so no
>> need to repeat the same methods, for example: setUp,
>> _execute_select_sql, tearDown
>>
>>
>> Thanks,
>> Khushboo
>>
>>
>> On Fri, Apr 17, 2020 at 3:49 PM Amol Vyavahare <
>> amol.vyavah...@enterprisedb.com> wrote:
>>
>>> Hi Khushboo,
>>>
>>> Please find attached the updated patch with the latest changes as
>>> suggested along with API test cases for the RM4946 issue fix.
>>>
>>> Thank You.
>>>
>>> On Wed, Apr 15, 2020 at 2:26 PM Amol Vyavahare <
>>> amol.vyavah...@enterprisedb.com> wrote:
>>>
 Sure, will do that.

 On Wed, Apr 15, 2020 at 1:33 PM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Amol,
>
> On Wed, Apr 15, 2020 at 12:06 PM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> I am reviewing this patch.
>>
>> Thanks,
>> Khushboo
>>
>> On Wed, Apr 15, 2020 at 11:45 AM Amol Vyavahare <
>> amol.vyavah...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>> Attached is the patch to fix the Issue with temporary tables on
>>> commit drop as. This patch fixes the issue where an error was thrown 
>>> when
>>> the user tried to create a temporary table via query tool and no result
>>> was displayed when the query was executed.
>>>
>>> Please review.
>>>
>>> Please write the API test cases for the same even if the changes are
> very small but they are in the SQL Editor backend code.
> The patch is working fine and looks good to me.
>
> Thanks,
> Khushboo
>
>> --
>>> *Regards,*
>>> *Amol Vyavahare*
>>> *E**nterpriseDB Corporation*
>>> The Enterprise Postgres Company
>>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>>> [image: EDB Postgres] Unit 301 A,
>>> Third Floor, Godrej Castlemaine,
>>> 155, Sassoon Road, Pune, MH - 411001
>>> [image: Blog Feed]  [image: Facebook]
>>>  [image: Twitter]
>>>  [image: LinkedIn]
>>>  [image: Google+]
>>> 
>>> Website: www.enterprisedb.com
>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>
>>>
>>>
>>>

 --
 *Regards,*
 *Amol Vyavahare*
 *E**nterpriseDB Corporation*
 The Enterprise Postgres Company
 *T: +91 20 6644 9600, M: +91 738 738 2128*
 [image: EDB Postgres] Unit 301 A, Third
 Floor, Godrej Castlemaine,
 155, Sassoon Road, Pune, MH - 411001
 [image: Blog Feed]  [image: Facebook]
  [image: Twitter]
  [image: LinkedIn]
  [image: Google+]
 
 Website: www.enterprisedb.com
 EnterpriseDB Blog: http://blogs.enterprisedb.com/
 Follow us on Twitter: http://www.twitter.com/enterprisedb




>>>
>>> --
>>> *Regards,*
>>> *Amol Vyavahare*
>>> *E**nterpriseDB Corporation*
>>> The Enterprise Postgres Company
>>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>>> [image: EDB Postgres] Unit 301 A, Third
>>> Floor, Godrej Castlemaine,
>>> 155, Sassoon Road, Pune, MH - 411001
>>> [image: Blog Feed]  [image: Facebook]
>>>  [image: Twitter]
>>>  [image: LinkedIn]
>>>  [image: Google+]
>>> 
>>> Website: www.enterprisedb.com
>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>
>>>
>>>
>>>
>
> --
> *Re

Re: [pgAdmin][RM5415] Query tool context menu on collection nodes not working

2020-04-20 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Apr 20, 2020 at 2:01 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is a small fix to make the query tool context menu on collection
> node work.
> Please review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

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


[pgAdmin][RM4545]: In grant wizard, last object is not selectable

2020-04-20 Thread Pradip Parkale
Hi Hackers,

Attached is a patch to fix the issue in the grand wizard.

This patch will fix:

   1. If we try to select the last object type in grant wizard, it's not
   getting selected.
   2. If we filter any object and select it, all the listed object types
   are getting selected.
   3. When you remove the text added in the filter search box by directly
   clicking the cross button, it doesn't show original data.


-- 
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation


RM4545.patch
Description: Binary data


[pgAdmin][RM5352] : Rightmost & Bottom tooltip crop issues in Explain Query Plan

2020-04-20 Thread Yogesh Jain
Hi Hackers,

Attached is the patch to fix the rightmost & bottom tooltip crop issues in
the explain query plan.

FYI : While explaining a large query if we hover the rightmost or bottom
icon the tooltip is cropped & partially visible, which is fixed in this
patch.

Please review.
PFA.

-- 
Regards,
Yogesh Jain
8982696654
diff --git a/web/pgadmin/misc/static/explain/js/explain.js b/web/pgadmin/misc/static/explain/js/explain.js
index f20a427e2..21167775d 100644
--- a/web/pgadmin/misc/static/explain/js/explain.js
+++ b/web/pgadmin/misc/static/explain/js/explain.js
@@ -994,6 +994,9 @@ define('pgadmin.misc.explain', [
 toolTipX = toolTipX < 0 ? 0 : (toolTipX);
 toolTipY = toolTipY < 0 ? 0 : (toolTipY);
 
+toolTipX = toolTipX > graphContainer.width()-toolTipContainer[0].clientWidth ? graphContainer.width()-(toolTipContainer[0].clientWidth*zoomFactor) : toolTipX;
+toolTipY = toolTipY > graphContainer.height()-toolTipContainer[0].clientHeight ? graphContainer.height()-(toolTipContainer[0].clientWidth*zoomFactor) : toolTipY;
+
 // Show toolTip at respective x,y coordinates
 toolTipContainer.css({
   'opacity': '0.8',


Re: [pgAdmin][RM5157] Default sort order at start in view table data by primary key by default

2020-04-20 Thread navnath gadakh
Hi Khushboo,
   I have modified the code as per review comments. Please review the
attached patch file.

Thanks!

On Mon, Apr 20, 2020 at 10:56 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Navnath,
>
> Review comments:
>
> 1. If we have multiple Primary keys, then we should include all the keys
> into the Order by clause.
> 2. In the Preferences dialog, please put this option  in the Query Tool >
> Options instead of Result Grid and also change the Label.
> 3. Please optimize the code, as I can see objectname.sql file is being
> used in else condition also, which is not required. Based on the parameter
> setting, Just one call of that sql is enough.
>
> Thanks,
> Khushboo
>
>
> On Fri, Apr 17, 2020 at 6:43 PM navnath gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hello Hackers,
>>
>>  Please find the modified patch with an option in Preferences for data
>> sorting by the primary key. Also, the previous  patch was not working with
>> table has no primary key.
>>
>> Thanks!
>>
>>
>>
>>
>> On Thu, Apr 16, 2020 at 5:01 PM Dave Page 
>> wrote:
>>
>>>
>>>
>>> On Thu, Apr 16, 2020 at 12:08 PM navnath gadakh <
>>> navnath.gad...@enterprisedb.com> wrote:
>>>
 Hi Dave/Team,
   This patch is related to the default sort order for the view
 table data. In pgAdminIII default ordering is by primary key and this is
 not working in pgAdminIV.
 I have attached the patch with the back end code.

 Please review it.

 *Question*: There is one suggestion on
 https://redmine.postgresql.org/issues/5157 about to put a checkbox in
 the configuration for this behavior.
   Do I need to implement that really? I yes, Is
 preferences a good place for that? / Suggestions?

>>>
>>> I think we should make this optional, and yes, Preferences is a good
>>> place. The reason is that sorting data is not without cost - at the very
>>> least it will require use of an index to access what may be the whole table.
>>>
>>> --
>>> Dave Page
>>> VP & Chief Architect, Database Infrastructure
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>

-- 
Regards,
Navnath Gadakh


RM-5157_v3.patch
Description: Binary data


Re: [pgAdmin][RM5157] Default sort order at start in view table data by primary key by default

2020-04-20 Thread navnath gadakh
Hi Khushboo,
Please hold this patch for review I'm still optimizing the code in the
patch.


On Mon, Apr 20, 2020 at 9:16 PM navnath gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hi Khushboo,
>I have modified the code as per review comments. Please review the
> attached patch file.
>
> Thanks!
>
> On Mon, Apr 20, 2020 at 10:56 AM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Navnath,
>>
>> Review comments:
>>
>> 1. If we have multiple Primary keys, then we should include all the keys
>> into the Order by clause.
>> 2. In the Preferences dialog, please put this option  in the Query Tool >
>> Options instead of Result Grid and also change the Label.
>> 3. Please optimize the code, as I can see objectname.sql file is being
>> used in else condition also, which is not required. Based on the parameter
>> setting, Just one call of that sql is enough.
>>
>> Thanks,
>> Khushboo
>>
>>
>> On Fri, Apr 17, 2020 at 6:43 PM navnath gadakh <
>> navnath.gad...@enterprisedb.com> wrote:
>>
>>> Hello Hackers,
>>>
>>>  Please find the modified patch with an option in Preferences for data
>>> sorting by the primary key. Also, the previous  patch was not working with
>>> table has no primary key.
>>>
>>> Thanks!
>>>
>>>
>>>
>>>
>>> On Thu, Apr 16, 2020 at 5:01 PM Dave Page 
>>> wrote:
>>>


 On Thu, Apr 16, 2020 at 12:08 PM navnath gadakh <
 navnath.gad...@enterprisedb.com> wrote:

> Hi Dave/Team,
>   This patch is related to the default sort order for the view
> table data. In pgAdminIII default ordering is by primary key and this is
> not working in pgAdminIV.
> I have attached the patch with the back end code.
>
> Please review it.
>
> *Question*: There is one suggestion on
> https://redmine.postgresql.org/issues/5157 about to put a checkbox in
> the configuration for this behavior.
>   Do I need to implement that really? I yes, Is
> preferences a good place for that? / Suggestions?
>

 I think we should make this optional, and yes, Preferences is a good
 place. The reason is that sorting data is not without cost - at the very
 least it will require use of an index to access what may be the whole 
 table.

 --
 Dave Page
 VP & Chief Architect, Database Infrastructure
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

>>>
>>>
>>> --
>>> Regards,
>>> Navnath Gadakh
>>>
>>
>
> --
> Regards,
> Navnath Gadakh
>


-- 
Regards,
Navnath Gadakh


[pgAdmin][RM3269] Slider jumps up issue in DataView panel

2020-04-20 Thread Nagesh Dhope
Hi Hackers,
The attached patch fixes an issue where slider jumps up when new rows get
loaded while scrolling down in the DataView panel in the query tool.
Fix uses *rows_affected *field to create dummy rows (Apart from the
first *batch
of rows). *Dummy rows will be updated as and when they are required*. *As
total required rows are created initially, SlickGrid will not readjust its
height when the next batch of rows are loaded. Hence the jump up in the
slider will not happen.

-- 
Thanks,
Nagesh


RM3269.patch
Description: Binary data


Re: [pgAdmin][RM5157] Default sort order at start in view table data by primary key by default

2020-04-20 Thread navnath gadakh
Hello Hackers,
 It's related to applying data sorting on table data by primary key.
With the existing implementation, we can view the table's data using 4
options with the different orders by default
1 - All Rows (No order)
2 - First 100 rows (ASC order)
3 - Last 100 rows (DESC order)
4 - Filtered rows (No order)

In the https://redmine.postgresql.org/issues/5157  it's not clearly
mentioned on which option to apply sorting by PK?  I'm assuming that should
be on ALL Rows option.

Please suggest.

Thanks!


On Tue, Apr 21, 2020 at 10:12 AM navnath gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hi Khushboo,
> Please hold this patch for review I'm still optimizing the code in the
> patch.
>
>
> On Mon, Apr 20, 2020 at 9:16 PM navnath gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hi Khushboo,
>>I have modified the code as per review comments. Please review the
>> attached patch file.
>>
>> Thanks!
>>
>> On Mon, Apr 20, 2020 at 10:56 AM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Navnath,
>>>
>>> Review comments:
>>>
>>> 1. If we have multiple Primary keys, then we should include all the keys
>>> into the Order by clause.
>>> 2. In the Preferences dialog, please put this option  in the Query Tool
>>> > Options instead of Result Grid and also change the Label.
>>> 3. Please optimize the code, as I can see objectname.sql file is being
>>> used in else condition also, which is not required. Based on the parameter
>>> setting, Just one call of that sql is enough.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>>
>>> On Fri, Apr 17, 2020 at 6:43 PM navnath gadakh <
>>> navnath.gad...@enterprisedb.com> wrote:
>>>
 Hello Hackers,

  Please find the modified patch with an option in Preferences for data
 sorting by the primary key. Also, the previous  patch was not working with
 table has no primary key.

 Thanks!




 On Thu, Apr 16, 2020 at 5:01 PM Dave Page 
 wrote:

>
>
> On Thu, Apr 16, 2020 at 12:08 PM navnath gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hi Dave/Team,
>>   This patch is related to the default sort order for the
>> view table data. In pgAdminIII default ordering is by primary key and 
>> this
>> is not working in pgAdminIV.
>> I have attached the patch with the back end code.
>>
>> Please review it.
>>
>> *Question*: There is one suggestion on
>> https://redmine.postgresql.org/issues/5157 about to put a checkbox
>> in the configuration for this behavior.
>>   Do I need to implement that really? I yes, Is
>> preferences a good place for that? / Suggestions?
>>
>
> I think we should make this optional, and yes, Preferences is a good
> place. The reason is that sorting data is not without cost - at the very
> least it will require use of an index to access what may be the whole 
> table.
>
> --
> Dave Page
> VP & Chief Architect, Database Infrastructure
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>


 --
 Regards,
 Navnath Gadakh

>>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>
>
> --
> Regards,
> Navnath Gadakh
>


-- 
Regards,
Navnath Gadakh