Re: [pgAdmin][RM4329] Initialization error when parameterised functions debugged in parallel in two separate tabs

2019-06-10 Thread Akshay Joshi
Hi Aditya

Following are the review comments:

   - "Set breakpoint" option not working, when click it throws an error.
   - Create an empty function and try to debug that. It should show proper
   error message.
   - Got the following backend error when closing the connection, please
   fix this:
  - File
  "E:\Projects\pgadmin4\web\pgadmin\tools\debugger\__init__.py", line 2053,
  in close_debugger_session
  conn_id=dbg_obj['exe_conn_id'])


On Fri, Jun 7, 2019 at 12:21 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch for debugger improvements. The changes include:
> 1) Change the way debug info is stored in session. Removed redundant
> session related code in debugger code. All the session related handling
> done at one place.
> 2) Fixed a bug where debugger was not opening for EPAS package function.
> 3) If a package is defined without body and we try to debug a proc/func,
> the debugger opened a blank window. Changes made so that it will throw
> error as "XYZ is not defined in package body."
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> 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][RM4310] User can not connect to the Master Password with Enter button

2019-06-10 Thread Dave Page
Hi

On Wed, Jun 5, 2019 at 1:39 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> On Wed, Jun 5, 2019 at 4:48 PM Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Jun 5, 2019 at 8:14 AM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to fix an issue where using browser autofills in
>>> alertify dialogs triggers the help page button (#4317).
>>> A workaround was added to master password dialog to avoid this, but that
>>> in turn disabled the 'OK' button tigger on pressing enter button. This is
>>> also fixed with this patch.(#4310)
>>>
>>
>> This isn't quite right. When the browser auto-fills the password, the OK
>> button remains disabled. I can hit enter though - however, I shouldn't be
>> able to do that when the OK button is disabled (being the default button on
>> the dialogue, it should respond to enter, unless another control which also
>> accepts enter has focus (e.g. a multiline text area).
>>
> The autofilled password appears as set, but it is actually not set to
> textbox unless you enter/click in the dropdown. We get the DOM element
> value as blank even if it appears filled. This is how chromium autofill
> behaves. Upon hitting enter the autofill value is set to the textbox and OK
> button is enabled.
>
>>
>> The OK button should be enabled - probably all the time, as the user
>> could have entered a blank password, and most systems won't prevent a user
>> from trying to use such a password.
>>
> I have made the changes to allow blank master password, plus enabling OK
> button always. Attached is the updated patch.
>

I think you've slightly mis-understood what I was trying to say.

- We should not allow a blank password.
- We should not disable the OK button at all.

My analogy was focussed on the fact that most systems never disable OK
buttons on login dialogues, as some of those systems (but not all of
course) may allow blank passwords.

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

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


pgAdmin 4 commit: Update French translation.

2019-06-10 Thread Dave Page
Update French translation.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=321b445a7e61031e7bed86dbad569c586ac453b8
Author: Fred Escallier 

Modified Files
--
.../translations/fr/LC_MESSAGES/messages.mo|  Bin 159456 -> 159592 bytes
.../translations/fr/LC_MESSAGES/messages.po| 1049 ++--
2 files changed, 500 insertions(+), 549 deletions(-)



Re: french translation for 4.8 release

2019-06-10 Thread Dave Page
Thanks - update committed!

On Thu, Jun 6, 2019 at 12:36 PM  wrote:

> hi
> ... too late :-)
> but done
> Fred
>


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

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


Re: [pgAdmin][RM4310] User can not connect to the Master Password with Enter button

2019-06-10 Thread Aditya Toshniwal
Hi,

On Mon, Jun 10, 2019 at 2:34 PM Dave Page  wrote:

> Hi
>
> On Wed, Jun 5, 2019 at 1:39 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Wed, Jun 5, 2019 at 4:48 PM Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Wed, Jun 5, 2019 at 8:14 AM Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 Attached is the patch to fix an issue where using browser autofills in
 alertify dialogs triggers the help page button (#4317).
 A workaround was added to master password dialog to avoid this, but
 that in turn disabled the 'OK' button tigger on pressing enter button. This
 is also fixed with this patch.(#4310)

>>>
>>> This isn't quite right. When the browser auto-fills the password, the OK
>>> button remains disabled. I can hit enter though - however, I shouldn't be
>>> able to do that when the OK button is disabled (being the default button on
>>> the dialogue, it should respond to enter, unless another control which also
>>> accepts enter has focus (e.g. a multiline text area).
>>>
>> The autofilled password appears as set, but it is actually not set to
>> textbox unless you enter/click in the dropdown. We get the DOM element
>> value as blank even if it appears filled. This is how chromium autofill
>> behaves. Upon hitting enter the autofill value is set to the textbox and OK
>> button is enabled.
>>
>>>
>>> The OK button should be enabled - probably all the time, as the user
>>> could have entered a blank password, and most systems won't prevent a user
>>> from trying to use such a password.
>>>
>> I have made the changes to allow blank master password, plus enabling OK
>> button always. Attached is the updated patch.
>>
>
> I think you've slightly mis-understood what I was trying to say.
>
> - We should not allow a blank password.
> - We should not disable the OK button at all.
>
> My analogy was focussed on the fact that most systems never disable OK
> buttons on login dialogues, as some of those systems (but not all of
> course) may allow blank passwords.
>
Got it !! Attached is the updated patch.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


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


RM4310_4317_v3.patch
Description: Binary data


Re: [pgAdmin][RM4195] Tab navigation is broken in Query tool (Accessibility)

2019-06-10 Thread Dave Page
Thanks, applied!

On Wed, Jun 5, 2019 at 1:18 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the updated, rebased patch. I was using the wrong key code for
> "[" and "]" while registering, but strangely it was working for me. I have
> corrected that.
> Plus, I found a bug in Preferences. If a preference name is same in two
> different modules, then it was registered only once in SQLiteDB. (eg-
> move_previous in Debugger and SQLEditor). Fixed that.
>
> Kindly review.
>
>
> On Thu, May 30, 2019 at 7:36 PM Dave Page  wrote:
>
>> Hi
>>
>> On Thu, May 30, 2019 at 4:40 AM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> On Thu, May 30, 2019 at 1:38 AM Dave Page  wrote:
>>>
 Hi

 On Tue, May 28, 2019 at 3:41 AM Aditya Toshniwal <
 aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> On Thu, May 23, 2019 at 1:31 PM Dave Page  wrote:
>
>> Hi,
>>
>> On further testing, this doesn't seem to be working as expected.
>> Alt+Shift+] or [ in the query tool are typing ’ and ” and not changing 
>> the
>> tab. If I switch to a non-input tab (e.g. History), they still don't 
>> work.
>>
> I am not able to simulate the quotes problem, but I have made a few
> corrections to fix the switching.
> Attached is the updated patch, kindly review.
>

 Alt+Shift+[ (or ]) don[t work at all for me now :-(

>>> Did you restart the server after applying the patch ?  What shortcut
>>> does preferences show ?
>>>
>>
>> Yes, did that, rebuilt the bundle and hard-reloaded the browser, all
>> multiple times.
>>
>> The shortcut preferences show the expected keys.
>>
>>
>>>

>
>> Alt+Shift+Tab changes the panel successfully though, and does cause
>> the flash as expected.
>>
>> I'm using Chrome 74.0.3729.131 on Mojave.
>>
>> On Wed, May 22, 2019 at 6:53 AM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Attached is the updated patch with doc changes.
>>>
>>> On Tue, May 21, 2019 at 5:42 PM Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi,

 On Tue, May 21, 2019 at 5:32 PM Dave Page 
 wrote:

> Hi
>
> On Tue, May 21, 2019 at 10:01 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch to fix the accessibility issue in query
>> tool.
>>
>> The query tool can be completely restructured unlike previously
>> where query tool used to stick at top and other tabs in the bottom.
>> - I have added a new shortcut to switch between frames if in
>> query tool the tab positions are changed. On switching the frames, 
>> the
>> frame will blink to show it is focussed.
>> - In the frame, you can switch tab same as previous. The tabs in
>> SQL editor are cyclic now, which means if you execute shortcut to go 
>> right
>> on the last tab then it will cycle to first tab.
>> - I have also changed the default shortcut to switch between tabs
>> from Shift+Ctrl+ArrowKeys to Shift+Ctrl+[ and ] similar to what we 
>> have in
>> browser tabs.
>> - Similar changes done for debugger also.
>>
>
> Shouldn't there be documentation changes to go with this?
>
 Yes, definitely :P
 Will send the updated patch.

>
> Otherwise, it seems to work :-)
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


 --
 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"
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> 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

>>>
>>>
>>> --
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> Software Engineer | Enterpr

pgAdmin 4 commit: Fix keyboard navigation in "inner" tabsets such as th

2019-06-10 Thread Dave Page
Fix keyboard navigation in "inner" tabsets such as the Query Tool and Debugger. 
Fixes #4195

Branch
--
master

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

Modified Files
--
docs/en_US/keyboard_shortcuts.rst  |  20 ++--
docs/en_US/release_notes_4_9.rst   |   1 +
web/pgadmin/static/js/keyboard_shortcuts.js| 107 +
web/pgadmin/static/js/utils.js |   4 +
web/pgadmin/tools/debugger/__init__.py |  26 -
web/pgadmin/tools/debugger/static/js/direct.js |  30 --
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  58 ++-
.../sqleditor/utils/query_tool_preferences.py  |  26 -
web/pgadmin/utils/preferences.py   |   2 +-
.../javascript/common_keyboard_shortcuts_spec.js   |  28 +-
web/regression/javascript/pgadmin_utils_spec.js|  20 +++-
11 files changed, 227 insertions(+), 95 deletions(-)



Re: [pgAdmin][RM4329] Initialization error when parameterised functions debugged in parallel in two separate tabs

2019-06-10 Thread Aditya Toshniwal
Hi Hackers,

Attached is the updated patch with fixes.

On Mon, Jun 10, 2019 at 12:58 PM Akshay Joshi 
wrote:

> Hi Aditya
>
> Following are the review comments:
>
>- "Set breakpoint" option not working, when click it throws an error.
>
> Fixed.

>
>- Create an empty function and try to debug that. It should show
>proper error message.
>
> This seems to be a bug in the debugger itself. I'll raise a bug with
simulation steps if it is. But, not sure where to raise.

>
>- Got the following backend error when closing the connection, please
>fix this:
>   - File
>   "E:\Projects\pgadmin4\web\pgadmin\tools\debugger\__init__.py", line 
> 2053,
>   in close_debugger_session
>   conn_id=dbg_obj['exe_conn_id'])
>
> Fixed.

>
> On Fri, Jun 7, 2019 at 12:21 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch for debugger improvements. The changes include:
>> 1) Change the way debug info is stored in session. Removed redundant
>> session related code in debugger code. All the session related handling
>> done at one place.
>> 2) Fixed a bug where debugger was not opening for EPAS package function.
>> 3) If a package is defined without body and we try to debug a proc/func,
>> the debugger opened a blank window. Changes made so that it will throw
>> error as "XYZ is not defined in package body."
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> 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
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM4329_v2.patch
Description: Binary data


pgAdmin 4 commit: Ensure that the Return key can be used to submit the

2019-06-10 Thread Dave Page
Ensure that the Return key can be used to submit the Master Password dialogue. 
Fixes #4310
Ensure that browser auto-fill doesn't cause Help pages to be opened 
unexpectedly. Fixes #4317

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_9.rst   |  2 ++
web/pgadmin/browser/static/js/browser.js   | 24 +-
web/pgadmin/static/js/alertify.pgadmin.defaults.js | 11 ++
3 files changed, 18 insertions(+), 19 deletions(-)



Re: [pgAdmin][RM4310] User can not connect to the Master Password with Enter button

2019-06-10 Thread Dave Page
Thanks, applied!

On Mon, Jun 10, 2019 at 10:35 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> On Mon, Jun 10, 2019 at 2:34 PM Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Jun 5, 2019 at 1:39 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> On Wed, Jun 5, 2019 at 4:48 PM Dave Page  wrote:
>>>
 Hi

 On Wed, Jun 5, 2019 at 8:14 AM Aditya Toshniwal <
 aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix an issue where using browser autofills in
> alertify dialogs triggers the help page button (#4317).
> A workaround was added to master password dialog to avoid this, but
> that in turn disabled the 'OK' button tigger on pressing enter button. 
> This
> is also fixed with this patch.(#4310)
>

 This isn't quite right. When the browser auto-fills the password, the
 OK button remains disabled. I can hit enter though - however, I shouldn't
 be able to do that when the OK button is disabled (being the default button
 on the dialogue, it should respond to enter, unless another control which
 also accepts enter has focus (e.g. a multiline text area).

>>> The autofilled password appears as set, but it is actually not set to
>>> textbox unless you enter/click in the dropdown. We get the DOM element
>>> value as blank even if it appears filled. This is how chromium autofill
>>> behaves. Upon hitting enter the autofill value is set to the textbox and OK
>>> button is enabled.
>>>

 The OK button should be enabled - probably all the time, as the user
 could have entered a blank password, and most systems won't prevent a user
 from trying to use such a password.

>>> I have made the changes to allow blank master password, plus enabling OK
>>> button always. Attached is the updated patch.
>>>
>>
>> I think you've slightly mis-understood what I was trying to say.
>>
>> - We should not allow a blank password.
>> - We should not disable the OK button at all.
>>
>> My analogy was focussed on the fact that most systems never disable OK
>> buttons on login dialogues, as some of those systems (but not all of
>> course) may allow blank passwords.
>>
> Got it !! Attached is the updated patch.
>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> 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: Initial support for PostgreSQL 12. Fixes #4283. Fixes

2019-06-10 Thread Dave Page
Initial support for PostgreSQL 12. Fixes #4283. Fixes #4288. Fixes #4290.

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_9.rst   |   3 +
.../foreign_tables/sql/12_plus/get_constraints.sql |   8 +
.../schemas/tables/partitions/__init__.py  |  60 +++---
.../databases/schemas/tables/static/js/table.js|  32 +++-
.../partitions/sql/pg/12_plus/properties.sql   |  83 
.../partitions/sql/ppas/12_plus/properties.sql |  83 
.../tables/templates/tables/sql/12_plus/create.sql | 182 ++
.../sql/12_plus/get_tables_for_constraints.sql |   8 +
.../templates/tables/sql/12_plus/properties.sql|  75 
.../tables/templates/tables/sql/12_plus/update.sql | 211 +
.../schemas/tables/tests/test_column_acl_sql.py|  12 +-
.../tables/tests/test_column_properties_sql.py |  12 +-
.../schemas/tables/tests/test_tables_acl_sql.py|  12 +-
.../schemas/tables/tests/test_tables_node_sql.py   |  12 +-
.../tables/tests/test_tables_properties_sql.py |  12 +-
.../tables/tests/test_trigger_get_oid_sql.py   |  12 +-
.../schemas/tables/tests/test_trigger_nodes_sql.py |  12 +-
.../schemas/types/tests/test_types_add.py  |   2 +-
.../templates/depends/sql/12_plus/dependencies.sql |  45 +
.../templates/depends/sql/12_plus/dependents.sql   |  44 +
.../servers/tests/test_dependencies_sql.py |  10 +-
.../servers/tests/test_dependents_sql.py   |  10 +-
.../sqlautocomplete/sql/default/columns.sql|   4 +-
web/pgadmin/tools/sqleditor/command.py |   8 +-
web/pgadmin/utils/versioned_template_loader.py |  12 +-
.../python_test_utils/sql_template_test_base.py|  45 +++--
26 files changed, 900 insertions(+), 109 deletions(-)



Re: [pgAdmin4][Patch]: Feature #4283 pgAdmin4 support for v12

2019-06-10 Thread Dave Page
Thanks, applied.

On Fri, Jun 7, 2019 at 11:39 AM Akshay Joshi 
wrote:

> Hi Hackers,
>
> Today I have read the https://www.postgresql.org/docs/release/12.0/ release
> note. I have created some new feature request and fixed one issue.
> Following are the issues that I have fixed:
>
>- Fixed existing issue to drop/delete partitions of the partition
>table.
>- Allow foreign keys to reference partitioned tables.
>
> Created following issues, not sure we need to consider it:
>
>1. #4333  Add support for
>function selectivity.
>2. #4334  Add support for
>generated columns.
>3. #4335  Add EXPLAIN
>option SETTINGS and SUMMARY
>
>
> Attached is the complete patch, ignore the previous patch. Please review
> it.
>
>
> On Thu, Jun 6, 2019 at 3:31 PM Akshay Joshi 
> wrote:
>
>> Hi Hackers,
>>
>> I have started adding support of PostgreSQL v12 in pgAdmin4. Attached is
>> the patch to fix the following issues:
>>
>>- RM #4290: "string indices must be integers" displayed for all
>>objects
>>- RM #4288: View data issue.
>>- PG v12  removes the ability to create table using WITH OIDS, so I
>>have modified the code in GUI as well as on backend.
>>- PG v12 removes obsolete pg_attrdef.adsrc and pg_constraint.consrc
>>column, so fixed with appropriate functions calls.
>>- For partitioned tables, since no storage is required for the table
>>itself. PG v12 throws and error while specifying "TABLESPACE" in create
>>table syntax for partitioned table, so fix that too.
>>
>> This is the initial patch to fix the issues that has been raised or I
>> have found. Will continue to work on adding support for v12. Will check the
>> release notes.
>>
>> --
>> *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*
>


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

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


pgAdmin 4 commit: Fix an initialisation error when two functions with p

2019-06-10 Thread Dave Page
Fix an initialisation error when two functions with parameters are debugged in 
parallel. Fixes #4329

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_9.rst   |   3 +-
web/pgadmin/tools/debugger/__init__.py | 587 +
web/pgadmin/tools/debugger/static/js/debugger.js   |  55 +-
.../tools/debugger/static/js/debugger_ui.js|  19 +-
.../tools/debugger/static/js/debugger_utils.js |  13 +
.../tools/debugger/utils/debugger_instance.py  |  81 +++
6 files changed, 387 insertions(+), 371 deletions(-)



Re: [pgAdmin][RM4329] Initialization error when parameterised functions debugged in parallel in two separate tabs

2019-06-10 Thread Dave Page
Thanks, patch applied.

On Mon, Jun 10, 2019 at 1:58 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the updated patch with fixes.
>
> On Mon, Jun 10, 2019 at 12:58 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Aditya
>>
>> Following are the review comments:
>>
>>- "Set breakpoint" option not working, when click it throws an error.
>>
>> Fixed.
>
>>
>>- Create an empty function and try to debug that. It should show
>>proper error message.
>>
>> This seems to be a bug in the debugger itself. I'll raise a bug with
> simulation steps if it is. But, not sure where to raise.
>
>>
>>- Got the following backend error when closing the connection, please
>>fix this:
>>   - File
>>   "E:\Projects\pgadmin4\web\pgadmin\tools\debugger\__init__.py", line 
>> 2053,
>>   in close_debugger_session
>>   conn_id=dbg_obj['exe_conn_id'])
>>
>> Fixed.
>
>>
>> On Fri, Jun 7, 2019 at 12:21 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch for debugger improvements. The changes include:
>>> 1) Change the way debug info is stored in session. Removed redundant
>>> session related code in debugger code. All the session related handling
>>> done at one place.
>>> 2) Fixed a bug where debugger was not opening for EPAS package function.
>>> 3) If a package is defined without body and we try to debug a proc/func,
>>> the debugger opened a blank window. Changes made so that it will throw
>>> error as "XYZ is not defined in package body."
>>>
>>> --
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> 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
> 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


[GSoC] Check if a query resultset is update-able

2019-06-10 Thread Yosry Muhammad
Dear all,

After some research and review of the code, I have arrived at this method
to check whether a query resultset is update-able. I would like to know
your feedback before I start implementing this technique:

- Query results are not be update-able (initially at least) except if all
the primary keys are selected and all the columns belong to the same table
(no joins or aggregations).
- When the query results is ready (polling is successful) I can check the
results in the back-end using the transaction connection cursor.
- The transaction cursor description attribute includes a list of Column
objects, each of which has attributes pointing to its original table in the
system catalog table *pg_class* (if available) and its attribute number
within the table. [1]
- From this information, the system catalog tables *pg_class, pg_attribute *and
*pg_constraint *can be queried to check that all the columns belong to a
single table and that all the primary keys are available. [2][3][4]
- This can be used as an indicator to whether the resultset is updatable
(similar to the View Table mode, where tables are only editable if they
have primary keys).

I will modify the following parts in the code:
1- *web/tools/sqleditor/command.py*
QueryToolCommand class will be modified to contain an attribute indicating
whether the query results are update-able for the last successful query.

2- A new file will be added in* web/tools/sqleditor/utils/* containing the
function that will check if the query results are update-able.

3-
*web/tools/sqleditor/__init__.py *
The poll endpoint will be modified to check if the results are update-able
(in case the results are ready), then the session object primary keys and
the transaction object can_edit attribute will be updated (the primary keys
are checked in the frontend, if they exist table modifications are allowed).

This is the first step, to check if a query resultset is update-able. The
upcoming steps will include switching the mode in the frontend to allow for
editing the results and checking what options should be enabled or disabled
and any needed modifications (I think allowing for only editing and
deleting rows makes sense).

Sorry for the long email, looking forward to your feedback!

[1] http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.Column
[2] https://www.postgresql.org/docs/current/catalog-pg-class.html
[3] https://www.postgresql.org/docs/current/catalog-pg-attribute.html
[4] https://www.postgresql.org/docs/current/catalog-pg-constraint.html

-- 
*Yosry Muhammad Yosry*

Computer Engineering student,
The Faculty of Engineering,
Cairo University (2021).
Class representative of CMP 2021.
https://www.linkedin.com/in/yosrym93/


Re: Is requirements.txt up2date?

2019-06-10 Thread Devrim Gündüz

Hi,

On Wed, 2019-06-05 at 13:02 +0100, Dave Page wrote:

> Yes. They're indirect dependencies, so don't appear in the list we
> maintain. Not sure about Blinker, but Werkzeug will be defined in the
> requirements.txt file for Flask.

Ack, thanks!

Cheers,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


signature.asc
Description: This is a digitally signed message part