pgAdmin 4 commit: Update Chinese translation.

2019-06-25 Thread Dave Page
Update Chinese translation.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c69ffaa91c6729b1dc2ef95d67cc35c6a32b3cb8
Author: Ma Yanhong 

Modified Files
--
.../translations/zh/LC_MESSAGES/messages.mo| Bin 138295 -> 138274 bytes
.../translations/zh/LC_MESSAGES/messages.po| 477 +++--
2 files changed, 248 insertions(+), 229 deletions(-)



pgAdmin 4 commit: Fix SSH tunnel password decryption. Fixes #4320

2019-06-25 Thread Dave Page
Fix SSH tunnel password decryption. Fixes #4320

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/server_manager.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



Re: [pgAdmin][RM4320] PgAdmin 4 fails to accept ssh password

2019-06-25 Thread Dave Page
Thanks, committed.

On Tue, Jun 25, 2019 at 2:00 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Based on the latest comments on the RM,
> https://redmine.postgresql.org/issues/4320#change-16998 - Replaced
> server_manager.py on my Win 10 system - could login and run queries, etc -
> but eventually got "create_ssh_tunnel() missing 1 required positional
> argument: 'tunnel_password'",attached is the patch to fix the issue.
>
> Kindly review and consider this for the upcoming release.
>
>
>
> On Wed, Jun 5, 2019 at 12:11 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Thanks patch applied.
>>
>> On Wed, Jun 5, 2019 at 10:44 AM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to fix a regression of Master Password #4184 where
>>> SSH tunnel connection using password is failing.
>>>
>>> --
>>> 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


Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Aditya Toshniwal
Hi,

On Mon, Jun 24, 2019 at 10:13 PM Yosry Muhammad  wrote:

> Hi,
>
> Please find attached a patch file with the following updates (last patch +
> updates) attached:
> - Changed the color to $color-gray-lighter and added the shortcut for the
> new button.
> - Added a preferences option to enable/disable prompting on uncommited
> transactions on exiting.
> - Changed call_render_after_poll_specs test to be in sync with code
> changes, also fixed a mix up in the test descriptions in the same file.
> - Fixed a bug with a recent patch 'Allow editing of data where a primary
> key column includes a % sign in the value.' that occurred when the primary
> key was a number.
>
> - After running python and feature tests, changes were made to nearly all
>>> the files (git status shows modifications in a ton of files), is there
>>> something I have done wrong?
>>>
>> What command did you use, can you share the screenshot of the files
>> changed?
>>
>
> I tried it again after a proper test_config.json as you mentioned and
> everything worked fine. All tests pass for this patch except for 3 feature
> tests that all fail because of a TimeoutException related to selenium.
> Please find a log file of the feature tests attached.
>
>
>>
>> - What else is missing from this patch to make it applicable ? I would
>>> like to produce a release-ready patch if possible. If so, I can continue
>>> working on the project on following patches, I just want to know what is
>>> the minimum amount of work needed to make this patch release-ready
>>> (especially that changes are being made in the master branch that require
>>> me to re-edit parts of the code that I have written before to keep things
>>> in-sync).
>>>
>> @Dave Page is the right person to answer this.
>>
>
> Waiting for his reply :D
>
> - For the bug that I reported before (generated queries in Query History
>>> appear in a distorted way for the user), to get the actual query that is
>>> being executed I can use the mogirfy() function of psycopg2 but I need
>>> access to a cursor. I can get one directly in save_changed_data() function
>>> by using conn.conn.cursor() but then I would be bypassing the wrapper
>>> Connection class. Should I modify the wrapper Connection class and add a
>>> function that can provide a cursor (or a wrapper around cursor.mogrify() )?
>>> Thoughts?
>>>
>> Could you please share the query/screenshot ? The query history just
>> stores the SQL text and fetches back to show in CodeMirror. No
>> modifications/generation of queries is done by Query History.
>>
>>>
>>>
> By 'generated queries' I meant the querie that are generated by pgAdmin to
> save changes to the data grid to the database. Here is a screenshot from
> the released version (not the version I am working on).
> [image: pg-query-history-bug.png]
> Scenario:
> - Opened View Data on a table (public.kweek)
> - Modified a cell in a column named media_url with a primary key (id = 50)
> to 'new link'
> - Instead of showing 'new link' in the query %(media_url) is shown.
>
The update queries fired internally should not go to history. Queries fired
by user only should go. That's what I think.

>
> This can be fixed in save_changed_data() function in my patch but I need
> access to a cursor as previously mentioned. Thoughts?
>
> Thanks a lot for your help!
>
>
>
> --
> *Yosry Muhammad Yosry*
>
> Computer Engineering student,
> The Faculty of Engineering,
> Cairo University (2021).
> Class representative of CMP 2021.
> https://www.linkedin.com/in/yosrym93/
>


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


Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Dave Page
Hi

On Mon, Jun 24, 2019 at 7:03 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

>
> - What else is missing from this patch to make it applicable ? I would
>> like to produce a release-ready patch if possible. If so, I can continue
>> working on the project on following patches, I just want to know what is
>> the minimum amount of work needed to make this patch release-ready
>> (especially that changes are being made in the master branch that require
>> me to re-edit parts of the code that I have written before to keep things
>> in-sync).
>>
> @Dave Page is the right person to answer this.
>

It needs:

- A code complete feature (or infrastructure/refactoring ready for a
feature), that is acceptable to us. Seems like this is 90% there for an
initial commit.
- Documentation updates.
- Tests for the new feature to ensure it works without needing manual
testing.
- To pass all existing tests (which may be modified if appropriate).

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

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


Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Dave Page
On Tue, Jun 25, 2019 at 7:09 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi,
>
> On Mon, Jun 24, 2019 at 10:13 PM Yosry Muhammad 
> wrote:
>
>> Hi,
>>
>> Please find attached a patch file with the following updates (last patch
>> + updates) attached:
>> - Changed the color to $color-gray-lighter and added the shortcut for the
>> new button.
>> - Added a preferences option to enable/disable prompting on uncommited
>> transactions on exiting.
>> - Changed call_render_after_poll_specs test to be in sync with code
>> changes, also fixed a mix up in the test descriptions in the same file.
>> - Fixed a bug with a recent patch 'Allow editing of data where a primary
>> key column includes a % sign in the value.' that occurred when the primary
>> key was a number.
>>
>> - After running python and feature tests, changes were made to nearly all
 the files (git status shows modifications in a ton of files), is there
 something I have done wrong?

>>> What command did you use, can you share the screenshot of the files
>>> changed?
>>>
>>
>> I tried it again after a proper test_config.json as you mentioned and
>> everything worked fine. All tests pass for this patch except for 3 feature
>> tests that all fail because of a TimeoutException related to selenium.
>> Please find a log file of the feature tests attached.
>>
>>
>>>
>>> - What else is missing from this patch to make it applicable ? I would
 like to produce a release-ready patch if possible. If so, I can continue
 working on the project on following patches, I just want to know what is
 the minimum amount of work needed to make this patch release-ready
 (especially that changes are being made in the master branch that require
 me to re-edit parts of the code that I have written before to keep things
 in-sync).

>>> @Dave Page is the right person to answer this.
>>>
>>
>> Waiting for his reply :D
>>
>> - For the bug that I reported before (generated queries in Query History
 appear in a distorted way for the user), to get the actual query that is
 being executed I can use the mogirfy() function of psycopg2 but I need
 access to a cursor. I can get one directly in save_changed_data() function
 by using conn.conn.cursor() but then I would be bypassing the wrapper
 Connection class. Should I modify the wrapper Connection class and add a
 function that can provide a cursor (or a wrapper around cursor.mogrify() )?
 Thoughts?

>>> Could you please share the query/screenshot ? The query history just
>>> stores the SQL text and fetches back to show in CodeMirror. No
>>> modifications/generation of queries is done by Query History.
>>>


>> By 'generated queries' I meant the querie that are generated by pgAdmin
>> to save changes to the data grid to the database. Here is a screenshot from
>> the released version (not the version I am working on).
>> [image: pg-query-history-bug.png]
>> Scenario:
>> - Opened View Data on a table (public.kweek)
>> - Modified a cell in a column named media_url with a primary key (id =
>> 50) to 'new link'
>> - Instead of showing 'new link' in the query %(media_url) is shown.
>>
> The update queries fired internally should not go to history. Queries
> fired by user only should go. That's what I think.
>

The conclusion I came to in previous discussion was that both should be
available, with a checkbox (off by default) to include the internal
queries, which would include any BEGIN/COMMITs etc.

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

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


Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Aditya Toshniwal
Hi,

On Tue, Jun 25, 2019 at 4:41 PM Dave Page  wrote:

>
>
> On Tue, Jun 25, 2019 at 7:09 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Mon, Jun 24, 2019 at 10:13 PM Yosry Muhammad 
>> wrote:
>>
>>> Hi,
>>>
>>> Please find attached a patch file with the following updates (last patch
>>> + updates) attached:
>>> - Changed the color to $color-gray-lighter and added the shortcut for
>>> the new button.
>>> - Added a preferences option to enable/disable prompting on uncommited
>>> transactions on exiting.
>>> - Changed call_render_after_poll_specs test to be in sync with code
>>> changes, also fixed a mix up in the test descriptions in the same file.
>>> - Fixed a bug with a recent patch 'Allow editing of data where a primary
>>> key column includes a % sign in the value.' that occurred when the primary
>>> key was a number.
>>>
>>> - After running python and feature tests, changes were made to nearly
> all the files (git status shows modifications in a ton of files), is there
> something I have done wrong?
>
 What command did you use, can you share the screenshot of the files
 changed?

>>>
>>> I tried it again after a proper test_config.json as you mentioned and
>>> everything worked fine. All tests pass for this patch except for 3 feature
>>> tests that all fail because of a TimeoutException related to selenium.
>>> Please find a log file of the feature tests attached.
>>>
>>>

 - What else is missing from this patch to make it applicable ? I would
> like to produce a release-ready patch if possible. If so, I can continue
> working on the project on following patches, I just want to know what is
> the minimum amount of work needed to make this patch release-ready
> (especially that changes are being made in the master branch that require
> me to re-edit parts of the code that I have written before to keep things
> in-sync).
>
 @Dave Page is the right person to answer this.

>>>
>>> Waiting for his reply :D
>>>
>>> - For the bug that I reported before (generated queries in Query History
> appear in a distorted way for the user), to get the actual query that is
> being executed I can use the mogirfy() function of psycopg2 but I need
> access to a cursor. I can get one directly in save_changed_data() function
> by using conn.conn.cursor() but then I would be bypassing the wrapper
> Connection class. Should I modify the wrapper Connection class and add a
> function that can provide a cursor (or a wrapper around cursor.mogrify() 
> )?
> Thoughts?
>
 Could you please share the query/screenshot ? The query history just
 stores the SQL text and fetches back to show in CodeMirror. No
 modifications/generation of queries is done by Query History.

>
>
>>> By 'generated queries' I meant the querie that are generated by pgAdmin
>>> to save changes to the data grid to the database. Here is a screenshot from
>>> the released version (not the version I am working on).
>>> [image: pg-query-history-bug.png]
>>> Scenario:
>>> - Opened View Data on a table (public.kweek)
>>> - Modified a cell in a column named media_url with a primary key (id =
>>> 50) to 'new link'
>>> - Instead of showing 'new link' in the query %(media_url) is shown.
>>>
>> The update queries fired internally should not go to history. Queries
>> fired by user only should go. That's what I think.
>>
>
> The conclusion I came to in previous discussion was that both should be
> available, with a checkbox (off by default) to include the internal
> queries, which would include any BEGIN/COMMITs etc.
>
OK. Yosry, How about storing the mogirfied query in the cookie/session when
the query is executed and then modifying query history storing logic to use
it when called ? This way you will not need to change any parsing when
query history is displayed.

> --
> 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"


Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Yosry Muhammad
Hi,


OK. Yosry, How about storing the mogirfied query in the cookie/session when
> the query is executed and then modifying query history storing logic to use
> it when called ? This way you will not need to change any parsing when
> query history is displayed.
>
>> --
>>
>
My problem is not where to store the mogrified query, I can just replace
the sql sent with the response to saving the data with the mogrified one.
In order to produce the mogrified query in the first place I need a
psycopg2.cursor object, but I only have access to a Connection object (the
wrapper, not the actual psycopg2.connection object). Should I modify that
wrapper Connection class to add a mogirfy function? or just get a cursor
using the psycopg2.connection object like this: conn.conn.cursor() - which
doesn't seem right. Thoughts?

Also, could you please help me with the selenium TimeoutException in the
feature tests? 3 tests are failing because of that exception and I am not
sure what is it related to. I am attaching the feature test log file in
this email if you would like to take a look on it.

Thanks !


-- 
*Yosry Muhammad Yosry*

Computer Engineering student,
The Faculty of Engineering,
Cairo University (2021).
Class representative of CMP 2021.
https://www.linkedin.com/in/yosrym93/
2019-06-24 18:11:45,799: ERROR	STDERR:	
2019-06-24 18:11:45,799: ERROR	STDERR:	=Running the test cases for 'PostgreSQL 11'=
2019-06-24 18:11:48,902: ERROR	STDERR:	runTest (pgadmin.feature_tests.browser_tool_bar_test.BrowserToolBarFeatureTest)
2019-06-24 18:11:48,902: ERROR	STDERR:	Browser tool bar feature test
2019-06-24 18:11:48,902: ERROR	STDERR:	 ...
2019-06-24 18:11:53,637: ERROR	STDERR:	
2019-06-24 18:11:53,638: ERROR	STDERR:	Query Tool ToolBar Button
2019-06-24 18:11:58,197: ERROR	STDERR:	OK.
2019-06-24 18:11:58,197: ERROR	STDERR:	
2019-06-24 18:11:58,197: ERROR	STDERR:	View Data ToolBar Button
2019-06-24 18:12:01,197: ERROR	STDERR:	OK.
2019-06-24 18:12:01,197: ERROR	STDERR:	
2019-06-24 18:12:01,197: ERROR	STDERR:	Filtered Rows ToolBar Button
2019-06-24 18:12:03,218: ERROR	STDERR:	OK.
2019-06-24 18:12:04,350: ERROR	STDERR:	ok
2019-06-24 18:12:04,351: ERROR	STDERR:	runTest (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
2019-06-24 18:12:04,351: ERROR	STDERR:	Copy rows, column using button and keyboard shortcut
2019-06-24 18:12:04,351: ERROR	STDERR:	 ...
2019-06-24 18:12:20,131: ERROR	STDERR:	ok
2019-06-24 18:12:20,131: ERROR	STDERR:	runTest (pgadmin.feature_tests.file_manager_test.CheckFileManagerFeatureTest)
2019-06-24 18:12:20,131: ERROR	STDERR:	File manager feature test
2019-06-24 18:12:20,131: ERROR	STDERR:	 ...
2019-06-24 18:12:24,483: ERROR	STDERR:	Tests to check if File manager is vulnerable to XSS...
2019-06-24 18:12:34,400: ERROR	STDERR:	ERROR
2019-06-24 18:12:34,400: ERROR	STDERR:	runTest (pgadmin.feature_tests.keyboard_shortcut_test.KeyboardShortcutFeatureTest)
2019-06-24 18:12:34,400: ERROR	STDERR:	Test for keyboard shortcut
2019-06-24 18:12:34,400: ERROR	STDERR:	 ...
2019-06-24 18:12:40,165: ERROR	STDERR:	Executing shortcut: File main menu...
2019-06-24 18:12:40,224: ERROR	STDERR:	OK
2019-06-24 18:12:40,276: ERROR	STDERR:	Executing shortcut: Object main menu...
2019-06-24 18:12:40,349: ERROR	STDERR:	OK
2019-06-24 18:12:40,349: ERROR	STDERR:	ok
2019-06-24 18:12:40,349: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
2019-06-24 18:12:40,350: ERROR	STDERR:	Test checks for PG data-types output
2019-06-24 18:12:40,350: ERROR	STDERR:	 ...
2019-06-24 18:13:06,492: ERROR	STDERR:	ok
2019-06-24 18:13:06,492: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_utilities_backup_restore_test.PGUtilitiesBackupFeatureTest)
2019-06-24 18:13:06,492: ERROR	STDERR:	Test for PG utilities - Backup and Restore
2019-06-24 18:13:06,492: ERROR	STDERR:	 ...
2019-06-24 18:13:24,523: ERROR	STDERR:	ok
2019-06-24 18:13:24,523: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_utilities_backup_restore_test.PGUtilitiesBackupFeatureTest)
2019-06-24 18:13:24,524: ERROR	STDERR:	Test for XSS in Backup and Restore
2019-06-24 18:13:24,524: ERROR	STDERR:	 ...
2019-06-24 18:13:42,125: ERROR	STDERR:	ok
2019-06-24 18:13:42,125: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_utilities_maintenance_test.PGUtilitiesMaintenanceFeatureTest)
2019-06-24 18:13:42,126: ERROR	STDERR:	Test for PG maintenance: database
2019-06-24 18:13:42,126: ERROR	STDERR:	 ...
2019-06-24 18:13:56,509: ERROR	STDERR:	ok
2019-06-24 18:13:56,510: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_utilities_maintenance_test.PGUtilitiesMaintenanceFeatureTest)
2019-06-24 18:13:56,510: ERROR	STDERR:	Test for PG maintenance: table
2019-06-24 18:13:56,510: ERROR	STDERR:	 ...
2019-06-24 18:14:12,895: ERROR	STDERR:	ok
2019-06-24 18:14:12,896: ERROR	STDERR:	runTest (pgadmin.feature_tests.pg_utilities_maintenance_test.PGUtilitiesMaintenanceFeatureTest)
2019-06-24 18:14:12,896: ERROR	STDERR:	Test fo

Re: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Yosry Muhammad
On Tue, Jun 25, 2019 at 1:09 PM Dave Page  wrote:

>
> - What else is missing from this patch to make it applicable ? I would
>>> like to produce a release-ready patch if possible. If so, I can continue
>>> working on the project on following patches, I just want to know what is
>>> the minimum amount of work needed to make this patch release-ready
>>> (especially that changes are being made in the master branch that require
>>> me to re-edit parts of the code that I have written before to keep things
>>> in-sync).
>>>
>> @Dave Page is the right person to answer this.
>>
>
> It needs:
>
> - A code complete feature (or infrastructure/refactoring ready for a
> feature), that is acceptable to us. Seems like this is 90% there for an
> initial commit.
> - Documentation updates.
> - Tests for the new feature to ensure it works without needing manual
> testing.
> - To pass all existing tests (which may be modified if appropriate).
>
>

Could you tell me what is missing from this patch (in terms of features -
other than tests) to be acceptable? I will start working on the tests once
the patch is complete. The patch passes all the existing tests except for 3
feature tests that fail due to a TimeoutException in selenium. I do not
know what this is about I hope Aditya will help me with it.

Also, do you mean code documentation or documentation for the users? Could
you point me towards the related parts?

Thanks a lot.


-- 
*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: [GSoC][Patch] Automatic Mode Detection V1

2019-06-25 Thread Aditya Toshniwal
Hi Yosry,

On Tue, Jun 25, 2019 at 8:46 PM Yosry Muhammad  wrote:

> Hi,
>
>
> OK. Yosry, How about storing the mogirfied query in the cookie/session
>> when the query is executed and then modifying query history storing logic
>> to use it when called ? This way you will not need to change any parsing
>> when query history is displayed.
>>
>>> --
>>>
>>
> My problem is not where to store the mogrified query, I can just replace
> the sql sent with the response to saving the data with the mogrified one.
> In order to produce the mogrified query in the first place I need a
> psycopg2.cursor object, but I only have access to a Connection object (the
> wrapper, not the actual psycopg2.connection object). Should I modify that
> wrapper Connection class to add a mogirfy function? or just get a cursor
> using the psycopg2.connection object like this: conn.conn.cursor() - which
> doesn't seem right. Thoughts?
>
That would be the way. But I think
web/pgadmin/utils/driver/psycopg2/cursor.py will be corrrect place to add
the mogrify function. Please note, psycopg2 does not support (,),% in the
parameter names. So if the column names has any of these characters,
mogrify might fail. Although it is handled with pgadmin_alias (line 493 -
web/pgadmin/tools/sqleditor/__init__.py), please test this case as well.

>
> Also, could you please help me with the selenium TimeoutException in the
> feature tests? 3 tests are failing because of that exception and I am not
> sure what is it related to. I am attaching the feature test log file in
> this email if you would like to take a look on it.
>
Can you check on latest chrome and chromdriver. You can check the
chromedriver version as below. Your venv should have the chromedriver
binary.

(pypg37) laptop207:pgadmin4 adityatoshniwal$ chromedriver  --version
ChromeDriver 75.0.3770.8
(681f24ea911fe754973dda2fdc6d2a2e159dd300-refs/branch-heads/3770@{#40})

>
> Thanks !
>
>
> --
> *Yosry Muhammad Yosry*
>
> Computer Engineering student,
> The Faculty of Engineering,
> Cairo University (2021).
> Class representative of CMP 2021.
> https://www.linkedin.com/in/yosrym93/
>


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


[pgAdmin][RM4139] Drag and drop object names in Query Editor from Browser Tree

2019-06-25 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to allow tree nodes to be dragged and dropped in
query editor wherever you take the drop cursor. The drop text will be fully
qualified and double quoted if required.
For functions/procedures it will drop the the label stripping away the
parameter names, with empty pair of round brackets. It will also set the
focus cursor inside the brackets if there were params otherwiser to the end
of text.
For adding a node type, you need to register it in browser.js along with a
callback function which will return drop text along with cursor positioning
and selection. Currently, I have registered for "table partition type
sequence package view mview foreign_table edbvar schema column edbfunc
function edbproc procedure".

Please note, the drag design customisation is not supported in IE.

Kindly review.

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


RM4139.patch
Description: Binary data