pgAdmin 4 commit: Add support for editing data in tables with OIDs but

2017-12-13 Thread Dave Page
Add support for editing data in tables with OIDs but no primary keys. Fixes 
#2849.

This patch also updates the editor to retrieve all row values on save, thus 
immediately showing default values and allowing subsequent editing without a 
refresh.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0c5a5ba9c29d27eebffad5914adb9af7551d8d96
Author: Khushboo Vashi 

Modified Files
--
.../tables/templates/column/sql/9.2_plus/nodes.sql |  10 +-
.../tables/templates/column/sql/default/nodes.sql  |   6 +-
web/pgadmin/tools/sqleditor/__init__.py|  23 -
web/pgadmin/tools/sqleditor/command.py | 105 ++---
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  57 +++
.../templates/sqleditor/sql/default/has_oids.sql   |   6 ++
.../templates/sqleditor/sql/default/insert.sql |   4 +-
.../sqleditor/sql/default/objectquery.sql  |   2 +-
.../templates/sqleditor/sql/default/select.sql |   9 ++
9 files changed, 183 insertions(+), 39 deletions(-)



Re: [pgAdmin4][Patch]: RM #2849 - Allow editing of data on tables with OIDs but no primary key

2017-12-13 Thread Dave Page
Awesome job - thanks, patch applied.

On Wed, Dec 6, 2017 at 9:27 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Please find the attached updated patch with some code cleanup.
>
>
> On Wed, Dec 6, 2017 at 2:34 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Tue, Dec 5, 2017 at 9:43 AM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Mon, Dec 4, 2017 at 4:01 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Sat, Dec 2, 2017 at 10:42 AM, Dave Page  wrote:

> Hi
>
> On Thursday, November 30, 2017, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached updated patch.
>>
>> On Mon, Nov 27, 2017 at 5:15 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Nov 23, 2017 at 1:28 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached patch for RM #2849: Allow editing of data
 on tables with OIDs but no primary key.

>>>
>>> I like that if I add a new row or rows and hit Save, the OIDs are
>>> fetched immediately. However;
>>>
>>> - It marks the row as read-only. We do that currently because we
>>> don't return the key info on Save, and thus require a Refresh before any
>>> further editing. However, if we have the OID, we can edit again 
>>> immediately.
>>>
>>> Fixed
>>
>>> - If we can return the new OIDs on Save, can't we do the same for
>>> primary key values? That would be consistent with OIDs, and would remove
>>> the need to disable rows, leading to a much nicer use experience I 
>>> think.
>>>
>>> Implemented
>>
>
> This looks great, however there is one small issue I spotted; it looks
> like we're inserting rows in a random order. For example, in the 
> screenshot
> attached, the last 5 rows were added in the order seen in the key1 column,
> and then I hit Save and got the id values returned. Is that caused by
> something we're doing, or the database server?
>
> The root cause of the issue is, Python dictionary does not preserve
 the order. To fix this issue I have manually sorted the added rows index
 and stored it into OrderedDict.
 Please find the attached updated patch.

>>>
>>> Thanks Khushboo. My apologies, but I found something else when testing.
>>> Instead of just returning and updating the values for the key columns, we
>>> should do it for all columns. This would have 2 benefits (and I suspect,
>>> might actually make the code a little more simple):
>>>
>>> Done
>>
>>> 1) We'd see the values for columns with default values.
>>>
>>> 2) We'd see the formatted values for other columns - e.g. with a JSONB
>>> column, you'll immediately see what the re-generated JSON looks like.
>>>
>>> I assume it's straightforward to update all columns rather than just the
>>> key columns?
>>>
>> The approach is same. Before I was just updating the primary keys/oids,
>> now I update all the columns of a row.
>>
>> Please find the attached updated patch.
>>
>>> Thanks!
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>> Thanks,
>> Khushboo
>>
>
>


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

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


Re: [pgAdmin4][RM2782][RM2822] fix array representation in query tool and data grid

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Thu, Dec 7, 2017 at 3:02 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Attached patch fixes array representation issue as well as
> multidimensional array representation issue.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



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

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


pgAdmin 4 commit: Re-hash the way that we handle rendering of special t

2017-12-13 Thread Dave Page
Re-hash the way that we handle rendering of special types such as arrays. Fixes 
#2782. Fixes #2822.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=55254a649f8864e246afe9442aef2d882a4479cb
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/feature_tests/test_data.json   |   6 +-
web/pgadmin/static/js/slickgrid/editors.js |  55 +
web/pgadmin/static/js/slickgrid/formatters.js  |  69 --
web/pgadmin/tools/datagrid/__init__.py |   3 +-
web/pgadmin/tools/sqleditor/__init__.py|   7 +-
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |   8 +-
web/pgadmin/utils/driver/psycopg2/__init__.py  | 159 ++---
web/pgadmin/utils/driver/psycopg2/cursor.py|   4 +-
web/pgadmin/utils/driver/psycopg2/typecast.py  | 250 +
9 files changed, 295 insertions(+), 266 deletions(-)



pgAdmin 4 commit: Ensure password changes are successful if authenticat

2017-12-13 Thread Dave Page
Ensure password changes are successful if authenticating using a pgpass file. 
Fixes #2720

Branch
--
master

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

Modified Files
--
.../browser/server_groups/servers/__init__.py  | 136 +++--
.../server_groups/servers/static/js/server.js  |  68 ---
web/pgadmin/utils/__init__.py  |  32 -
web/pgadmin/utils/driver/psycopg2/__init__.py  |  43 ---
4 files changed, 210 insertions(+), 69 deletions(-)



Re: [pgAdmin4][Patch]: Change password doesn't work if pgpass file is used

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Fri, Dec 8, 2017 at 5:51 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where changing a database server password
> functionlity was not working if user has made connection using pgpass file.
> Also ViewData/Query tool functionality was not working with pgpass file.
> RM#2720
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


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

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


pgAdmin 4 commit: Fix label inconsistency spotted by Susan.

2017-12-13 Thread Dave Page
Fix label inconsistency spotted by Susan.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/static/js/server.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Re: [INSTALLERS] pgAdmin 4: Add-on support

2017-12-13 Thread Dave Page
The code is broken right now - see
https://redmine.postgresql.org/issues/2952. Once it's fixed, I can do this,
assuming I can find the spare time.

On Thu, Dec 7, 2017 at 4:05 PM, Ashesh Vashi 
wrote:

> Hi Dave,
>
> I've merged the master branch in the 'WEBPACK_DEVEL2' branch.
>
> In this branch, I've modified the code for adding back the support of
> pluggability, which was broken due to webpack changes.
>
> Would you please create the set of installers?
> And, share it with Fahar for doing the integration testing after these
> changes.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>



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

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


pgAdmin 4 commit: Ensure the datatype cache is updated when a domain is

2017-12-13 Thread Dave Page
Ensure the datatype cache is updated when a domain is added. Fixes #2778

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/domains/static/js/domain.js |  6 --
.../fts_configurations/static/js/fts_configuration.js |  2 +-
.../databases/schemas/tables/column/static/js/column.js   |  1 +
.../servers/databases/schemas/tables/static/js/table.js   | 15 ++-
.../servers/databases/schemas/types/static/js/type.js |  2 +-
.../browser/server_groups/servers/static/js/privilege.js  |  2 +-
web/pgadmin/browser/static/js/node.js |  7 +++
web/pgadmin/browser/static/js/node.ui.js  | 11 +++
8 files changed, 36 insertions(+), 10 deletions(-)



Re: [pgAdmin4][Patch]: Newly created domain not listed in Data type

2017-12-13 Thread Dave Page
Thanks, applied.

On Mon, Dec 11, 2017 at 9:37 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where newly created domains are not listed
> under Data type combo box in 'Create Table' dialog.
> RM#2778
>
> Also fixed typo in FTS Configuration.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


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

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


pgAdmin 4 commit: Prevent attempts to select directories as files in th

2017-12-13 Thread Dave Page
Prevent attempts to select directories as files in the file dialogue. Fixes 
#2937

Branch
--
master

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

Modified Files
--
web/pgadmin/misc/file_manager/__init__.py  |  4 ++-
web/pgadmin/misc/file_manager/static/js/utility.js | 13 -
.../file_manager/templates/file_manager/index.html | 34 +-
3 files changed, 29 insertions(+), 22 deletions(-)



Re: [pgAdmin4][Patch]: File manager - Fix logic to enable 'Select' button in List/Table view

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Mon, Dec 11, 2017 at 11:39 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where double clicking on folder enables the
> 'Select' button in List/Table view.
> RM#2937
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


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

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


pgAdmin 4 commit: Ensure column collation isn't lost when changing fiel

2017-12-13 Thread Dave Page
Ensure column collation isn't lost when changing field size. Fixes #2779

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=107795db1097367b5090e30869046377106c9eef
Author: Khushboo Vashi 

Modified Files
--
.../schemas/tables/column/static/js/column.js  |  4 +-
.../templates/column/sql/9.2_plus/update.sql   |  4 +-
.../tables/templates/column/sql/default/update.sql |  4 +-
.../servers/databases/schemas/tables/utils.py  | 43 --
.../type/macros/get_full_type_sql_format.macros|  6 +--
.../servers/databases/schemas/utils.py |  2 +-
6 files changed, 34 insertions(+), 29 deletions(-)



Re: [pgAdmin4][Patch]: Fixed RM #2779 - Lost field size

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Mon, Dec 11, 2017 at 12:46 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
> On Mon, Dec 11, 2017 at 6:03 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Dec 11, 2017 at 5:45 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Dec 11, 2017 at 5:40 PM, Dave Page  wrote:
>>>
 Hi

 On Wed, Dec 6, 2017 at 5:45 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2779: Lost field size.
>
> While editing the table column, if we change collate then, the length
> and the precision are lost.
> Also, while changing column type, it does not honour the length and
> precision.
>

 Now it loses the collation if you edit the length.

 Fixed.
> Please find the attached patch.
>
>> I have tested it, it's not loosing the collation.
>>> Please let me know the steps to reproduce this.
>>>
>> Reproduced. Will send the patch.
>>
>>> :-(


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

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

>>>
>>>
>>
>


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

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


pgAdmin 4 commit: Preferences dialogue help update.

2017-12-13 Thread Dave Page
Preferences dialogue help update.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d02a0de8c9eba597c7289a7a3c03b7dba8df433f
Author: Susan Douglas 

Modified Files
--
docs/en_US/images/preferences_browser_display.png  | Bin 54470 -> 51492 bytes
docs/en_US/images/preferences_browser_nodes.png| Bin 84692 -> 82805 bytes
.../images/preferences_browser_properties.png  | Bin 0 -> 51937 bytes
docs/en_US/images/preferences_dashboard_graphs.png | Bin 99439 -> 90077 bytes
docs/en_US/images/preferences_debugger_display.png | Bin 0 -> 55784 bytes
.../images/preferences_misc_user_language.png  | Bin 0 -> 51034 bytes
docs/en_US/images/preferences_paths_binary.png | Bin 102585 -> 95867 bytes
docs/en_US/images/preferences_paths_help.png   | Bin 93698 -> 91887 bytes
docs/en_US/images/preferences_sql_csv_output.png   | Bin 86945 -> 56281 bytes
docs/en_US/images/preferences_sql_display.png  | Bin 91382 -> 76673 bytes
docs/en_US/images/preferences_sql_explain.png  | Bin 0 -> 56722 bytes
docs/en_US/images/preferences_sql_options.png  | Bin 108225 -> 106776 bytes
docs/en_US/images/preferences_sql_results_grid.png | Bin 0 -> 58781 bytes
docs/en_US/images/preferences_storage_options.png  | Bin 139187 -> 59452 bytes
docs/en_US/preferences.rst | 173 +++--
15 files changed, 123 insertions(+), 50 deletions(-)



Re: pgAdmin 4 - Update for Preferences dialog

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Mon, Dec 11, 2017 at 5:39 PM, Susan Douglas <
susan.doug...@enterprisedb.com> wrote:

> Hi All,
>
> I've attached a patch that (hopefully) updates the documented behaviors of
> the Preferences dialog.  If you could look it over, and apply it, I'd
> appreciate it!
>
> As always, let me know if there are problems - Thanks!
>
> -- Susan
>
> PS - I've attached the .rst and .png files that were updated in this patch
> below as well...
>
>
>
>
>
>


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

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


pgAdmin 4 commit: Don't un-comment code with alt+. in the query tool. I

2017-12-13 Thread Dave Page
Don't un-comment code with alt+. in the query tool. It's only supposed to 
respond to ctrl/cmd+. Fixes #2769

Branch
--
master

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

Modified Files
--
.../static/js/sqleditor/keyboard_shortcuts.js  | 38 ++
1 file changed, 32 insertions(+), 6 deletions(-)



Re: [pgAdmin4][Patch]: To fix query tool editor keyboard shortcut

2017-12-13 Thread Dave Page
Thanks, patch applied.

On Tue, Dec 12, 2017 at 7:38 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where pressing Ctrl + Alt + . on query tool
> editor window triggers Inline uncomment code functionality which is wrong
> it should only trigger if user presses Ctrl + .
> RM#2769
>
> Tested on macOS, Linux, Windows with web version.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


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

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


Re: [pgAdmin4][Patch]: Add basic Tab navigation - Debugger

2017-12-13 Thread Dave Page
Hi,

On Wed, Dec 13, 2017 at 7:55 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to add basic Tab key navigation in debugger window, where user
> will be able to navigate buttons using Tab key.
> RM#2897
>
> TODO:// Need to work on Debugger window Panel navigation.
>

Given our conversation this morning, do we still want to apply this at this
time?

(for the benefit of the list, Murtuza, Khushboo, Harshal and I were
discussing a keyboard navigation strategy for the whole application).

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

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


Re: pgAdmin 4 - Update for Server dialog

2017-12-13 Thread Khushboo Vashi
Hi susan,

I am getting an error while applying the patch, attached the screen-shot
for the same.

Thanks,
Khushboo


On Wed, Dec 13, 2017 at 11:20 PM, Susan Douglas <
susan.doug...@enterprisedb.com> wrote:

>
> Hi All,
>
> I've attached a patch that (hopefully) updates the documented behaviors of
> the Server dialog.  If you could look it over, and apply it, I'd appreciate
> it!
>
> As always, let me know if there are problems - Thanks!
>
> -- Susan
>
> PS - I've attached the .rst and .png files that were updated in this patch
> below as well...
>
>
>
>
>
>