Re: [pgadmin-hackers] [pgAdmin4][Patch]: Load module's JS files only when required

2017-06-06 Thread Dave Page
Hi

On Mon, Jun 5, 2017 at 10:22 AM, Surinder Kumar
 wrote:
> Hi Dave,
>
> Please find attached patch for minifying CSS files and optimize images using
> Webpack.
>
> Steps to run:
>
> 1) After applying patch, go to web directory and run npm install on terminal
> to install packages which are used to parse/minify CSS files.
>
> 2) Run npm run build which creates dist folder inside web/pgadmin/static/
> directory to store processed images, fonts and css files.
>
> 3. Set DEBUG = False in config_local.py and then run python pgAdmin.py to
> start server.
> I kept generated main.css and overrides.css conditional in base.html to load
> them only when debug mode is False
>
>
> After running "npm run build", following files/directories are generated:
>
> 1) main.css -  about 20 vendor CSS files are packed into this file and more
> importantly the paths to images are preserved.
>
> 2) overrides.css - it contains bootstrap.overrides.css and pgadmin.css, they
> has to be packed separately and loaded after all CSS files are loaded
> because the purpose of these files is to override the vendor or modules css.
>
> 3) img - it contains the images used in CSS files. The name of image files
> can also be hashed names for caching purpose which we can use.
>
> 4) fonts - it contains the fonts used in fontawesome.css and other css
> files.
>
> This is a simple patch to demonstrate how CSS files will be minified with
> Webpack.

I think this is a good, simple method. It handles debug v.s release,
and of course, any plugin modules can include their own images/CSS
without even having to worry about webpacking if installed later.

> For now it minifies only vendor CSS files, I will add modules static files
> in the list later on.

I think we need to do that to get a better idea of the benefits. We
also need to get some of the JS code in there as well (Ashesh should
be able to help with that - he told me he's de-templatised a lot of
that now).

> Any thoughts on minifying template CSS files which are built dynamically and
> loaded with dependency on other modules?

Let's look at why they are templates. Is that required, or could they
be made static?

> Also, I looked into Flask-webpack which generates bundled assets using
> Webpack(webpack.config.js) and provide additionally global template tags to
> use in Jinja templates.
>
> But it might not work with latest version of Webpack as this repo is not
> updated since last 2 years. I need to check with latest version and I will
> update on this.

Given how straightforward this seems to be, I'm not sure it's needed.

Joao, any comments?

Nice work - thanks!

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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM 2324 - PostGIS datatypes not showing up properly on SQL tab.

2017-06-06 Thread Dave Page
On Tue, Jun 6, 2017 at 2:15 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On 6 Jun 2017 18:36, "Dave Page"  wrote:
>
>
>
> On Tue, Jun 6, 2017 at 1:23 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On 6 Jun 2017 17:42, "Dave Page"  wrote:
>>
>> Hi
>>
>> The table and column dialogues seem to have related problems. For
>> example, the table dialogue shows the length of the geometry field in the
>> test case as 847,380, whilst the column dialogue shows no length at all.
>>
>> What should be there in length and precision fields in this case?
>>
>
> I have no idea :-). What did pgAdmin 3 do here? I assume there's some way
> to decode the typmod into the desired values, and map them back to
> appropriate SQL.
>
> I will try to figure out the way.
> pgAdmin 3 has the same issue, so I have asked for the suggestion.
>

Oh, OK - thanks. Maybe we need to reuse the length and precision fields for
these types. That is, I believe, essentially how PostGIS passes extra info
to the column definitions.


>
>
>> Also, I there should be a space between the , and value in the_geom
>> geometry(MultiPolygon,3310).
>>
>> Thanks.
>>
>> On Mon, Jun 5, 2017 at 8:32 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Fixed PostGIS datatype on SQL tab for Table, column, Foreign Table and
>>> Type node.
>>>
>>> Please find the attached updated patch.
>>>
>>>
>>> Thanks,
>>> Khushboo
>>>
>>> On Thu, Jun 1, 2017 at 6:36 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>

 On Thu, Jun 1, 2017 at 5:27 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
>
> On Thu, Jun 1, 2017 at 4:57 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Khushboo,
>>
>> Please include Type node and Foreign Table node in your fix :-)
>>
>> I don't think Type node requires this change.
>
> Yes, It do require because user can create composite type from
 existing types.
 [image: Inline image 1]

> Foreign table changes added in the attached updated patch.
>
>> --
>>
> Thanks Murtuza for pointing this out.
>>>
>>>
 Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Thu, Jun 1, 2017 at 3:23 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix RM #2324 : PostGIS datatypes
>>> not showing up properly on SQL tab.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hack...@postgresql.or
>>> g)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>

>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>>
>> --
>> 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
>
>
>


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

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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM 2324 - PostGIS datatypes not showing up properly on SQL tab.

2017-06-06 Thread Khushboo Vashi
On 6 Jun 2017 18:36, "Dave Page"  wrote:



On Tue, Jun 6, 2017 at 1:23 PM, Khushboo Vashi  wrote:

>
>
> On 6 Jun 2017 17:42, "Dave Page"  wrote:
>
> Hi
>
> The table and column dialogues seem to have related problems. For example,
> the table dialogue shows the length of the geometry field in the test case
> as 847,380, whilst the column dialogue shows no length at all.
>
> What should be there in length and precision fields in this case?
>

I have no idea :-). What did pgAdmin 3 do here? I assume there's some way
to decode the typmod into the desired values, and map them back to
appropriate SQL.

I will try to figure out the way.
pgAdmin 3 has the same issue, so I have asked for the suggestion.



> Also, I there should be a space between the , and value in the_geom
> geometry(MultiPolygon,3310).
>
> Thanks.
>
> On Mon, Jun 5, 2017 at 8:32 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Fixed PostGIS datatype on SQL tab for Table, column, Foreign Table and
>> Type node.
>>
>> Please find the attached updated patch.
>>
>>
>> Thanks,
>> Khushboo
>>
>> On Thu, Jun 1, 2017 at 6:36 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>>
>>> On Thu, Jun 1, 2017 at 5:27 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,


 On Thu, Jun 1, 2017 at 4:57 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Khushboo,
>
> Please include Type node and Foreign Table node in your fix :-)
>
> I don't think Type node requires this change.

 Yes, It do require because user can create composite type from existing
>>> types.
>>> [image: Inline image 1]
>>>
 Foreign table changes added in the attached updated patch.

> --
>
 Thanks Murtuza for pointing this out.
>>
>>
>>> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jun 1, 2017 at 3:23 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #2324 : PostGIS datatypes
>> not showing up properly on SQL tab.
>>
>> Thanks,
>> Khushboo
>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org
>> )
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>

>>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> 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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM 2324 - PostGIS datatypes not showing up properly on SQL tab.

2017-06-06 Thread Dave Page
On Tue, Jun 6, 2017 at 1:23 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On 6 Jun 2017 17:42, "Dave Page"  wrote:
>
> Hi
>
> The table and column dialogues seem to have related problems. For example,
> the table dialogue shows the length of the geometry field in the test case
> as 847,380, whilst the column dialogue shows no length at all.
>
> What should be there in length and precision fields in this case?
>

I have no idea :-). What did pgAdmin 3 do here? I assume there's some way
to decode the typmod into the desired values, and map them back to
appropriate SQL.


>
> Also, I there should be a space between the , and value in the_geom
> geometry(MultiPolygon,3310).
>
> Thanks.
>
> On Mon, Jun 5, 2017 at 8:32 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Fixed PostGIS datatype on SQL tab for Table, column, Foreign Table and
>> Type node.
>>
>> Please find the attached updated patch.
>>
>>
>> Thanks,
>> Khushboo
>>
>> On Thu, Jun 1, 2017 at 6:36 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>>
>>> On Thu, Jun 1, 2017 at 5:27 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,


 On Thu, Jun 1, 2017 at 4:57 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Khushboo,
>
> Please include Type node and Foreign Table node in your fix :-)
>
> I don't think Type node requires this change.

 Yes, It do require because user can create composite type from existing
>>> types.
>>> [image: Inline image 1]
>>>
 Foreign table changes added in the attached updated patch.

> --
>
 Thanks Murtuza for pointing this out.
>>
>>
>>> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jun 1, 2017 at 3:23 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #2324 : PostGIS datatypes
>> not showing up properly on SQL tab.
>>
>> Thanks,
>> Khushboo
>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org
>> )
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>

>>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> 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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM 2324 - PostGIS datatypes not showing up properly on SQL tab.

2017-06-06 Thread Khushboo Vashi
On 6 Jun 2017 17:42, "Dave Page"  wrote:

Hi

The table and column dialogues seem to have related problems. For example,
the table dialogue shows the length of the geometry field in the test case
as 847,380, whilst the column dialogue shows no length at all.

What should be there in length and precision fields in this case?


Also, I there should be a space between the , and value in the_geom
geometry(MultiPolygon,3310).

Thanks.

On Mon, Jun 5, 2017 at 8:32 AM, Khushboo Vashi  wrote:

> Hi,
>
> Fixed PostGIS datatype on SQL tab for Table, column, Foreign Table and
> Type node.
>
> Please find the attached updated patch.
>
>
> Thanks,
> Khushboo
>
> On Thu, Jun 1, 2017 at 6:36 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> On Thu, Jun 1, 2017 at 5:27 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>>
>>> On Thu, Jun 1, 2017 at 4:57 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Khushboo,

 Please include Type node and Foreign Table node in your fix :-)

 I don't think Type node requires this change.
>>>
>>> Yes, It do require because user can create composite type from existing
>> types.
>> [image: Inline image 1]
>>
>>> Foreign table changes added in the attached updated patch.
>>>
 --

>>> Thanks Murtuza for pointing this out.
>
>
>> Regards,
 Murtuza Zabuawala
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

 On Thu, Jun 1, 2017 at 3:23 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2324 : PostGIS datatypes not
> showing up properly on SQL tab.
>
> Thanks,
> Khushboo
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

>>>
>>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


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

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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM 2324 - PostGIS datatypes not showing up properly on SQL tab.

2017-06-06 Thread Dave Page
Hi

The table and column dialogues seem to have related problems. For example,
the table dialogue shows the length of the geometry field in the test case
as 847,380, whilst the column dialogue shows no length at all.

Also, I there should be a space between the , and value in the_geom
geometry(MultiPolygon,3310).

Thanks.

On Mon, Jun 5, 2017 at 8:32 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Fixed PostGIS datatype on SQL tab for Table, column, Foreign Table and
> Type node.
>
> Please find the attached updated patch.
>
>
> Thanks,
> Khushboo
>
> On Thu, Jun 1, 2017 at 6:36 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>>
>> On Thu, Jun 1, 2017 at 5:27 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>>
>>> On Thu, Jun 1, 2017 at 4:57 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Khushboo,

 Please include Type node and Foreign Table node in your fix :-)

 I don't think Type node requires this change.
>>>
>>> Yes, It do require because user can create composite type from existing
>> types.
>> [image: Inline image 1]
>>
>>> Foreign table changes added in the attached updated patch.
>>>
 --

>>> Thanks Murtuza for pointing this out.
>
>
>> Regards,
 Murtuza Zabuawala
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

 On Thu, Jun 1, 2017 at 3:23 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2324 : PostGIS datatypes not
> showing up properly on SQL tab.
>
> Thanks,
> Khushboo
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

>>>
>>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


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

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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS

2017-06-06 Thread Dave Page
Thanks, patch applied.

On Mon, Jun 5, 2017 at 8:13 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the issue where debugger module is not throwing proper
> error for unsupported argument mode type in procedure.
> RM#1466
>
> @Neel,
> Can you please do quick review of this patch?
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Prevent attempts to debug procedures with variadic ar

2017-06-06 Thread Dave Page
Prevent attempts to debug procedures with variadic arguments. Fixes #1466

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/debugger/__init__.py | 9 +
1 file changed, 9 insertions(+)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Add feature tests for the View Data tool.

2017-06-06 Thread Dave Page
Add feature tests for the View Data tool.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=beda7ebbf2fde76344882625dce25f672e4240d3
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/feature_tests/test_data.json   |  18 ++
web/pgadmin/feature_tests/view_data_dml_queries.py | 282 +
web/regression/feature_utils/pgadmin_page.py   |  27 +-
web/regression/python_test_utils/test_utils.py |  30 ++-
4 files changed, 355 insertions(+), 2 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns with defaults set to NULL when removing contents after pasting in the edit grid

2017-06-06 Thread Dave Page
Thanks, patch applied.

On Fri, Jun 2, 2017 at 8:55 PM, Surinder Kumar
 wrote:
> Hi Dave,
>
> Please find updated patch with following changes:
>
> 1) Locate grid row by div's style attribute 'top'(i.e. 'top:0px' for first
> row), instead of by div class-name because the order of rendered rows is not
> always same.
>
> 2) Increase the wait timeout of WebDriverWait to 5 seconds in
> '_compare_cell_value(...)' method.
>
> 3) Add a new utils method 'find_by_css_selector' in pgadmin_page.py to
> locate css element with wait_for method.
>
> 4) Add a new utils method 'wait_for_element_to_stale' in pgadmin_page.py. It
> is useful when "StaleElementReferenceException" exception is raised and
> element is not attached to the page while finding element by xpath.
>
> 5) Instead of finding each cell value by xpath and compare with actual
> value, now a row is located using xpath and all of cell values are extracted
> into an array and then compared with actual values. It eliminates the use of
> wait_timeout.
>
> Also, I added a print statement for debugging where a TimeoutException was
> occurred last time.
>
>
> On Sun, May 28, 2017 at 1:58 AM, Dave Page  wrote:
>>
>> Here's the screenshot.
>>
>> On Sat, May 27, 2017 at 4:26 PM, Dave Page  wrote:
>> > Hi
>> >
>> > On Sat, May 27, 2017 at 4:03 PM, Surinder Kumar
>> >  wrote:
>> >> Hi Dave
>> >>
>> >> Please find update Feature test cases patch.
>> >>
>> >> On Sun, May 28, 2017 at 12:40 AM, Dave Page  wrote:
>> >>>
>> >>> Thanks - I committed the code changes, as they seem to work very well.
>> >>> The regression tests are failing for me though :-(. Can you take
>> >>> another look please? Note that I'm running under Python 2.7 on Mal
>> >>
>> >> Actually i used the generic close_query_tool method to close view data
>> >> panel
>> >> which popup with unsaved changes. but in my case nothing popups as
>> >> there as
>> >> no unsaved changes, so clicking on [x] button close the panel. So I
>> >> write
>> >> close_data_grid method in pgadmin_page.py file.
>> >
>> > It passed with PG 9.4, but then failed (twice) under 9.6:
>> >
>> > ==
>> > ERROR: runTest
>> > (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
>> > Validate Insert, Update operations in View data with given test data
>> > --
>> > Traceback (most recent call last):
>> >   File
>> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
>> > line 105, in runTest
>> > self._copy_paste_row()
>> >   File
>> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
>> > line 250, in _copy_paste_row
>> > self._verify_row_data(False)
>> >   File
>> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
>> > line 275, in _verify_row_data
>> > self._compare_cell_value(cell_xpath, config_data[str(idx)][1])
>> >   File
>> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
>> > line 142, in _compare_cell_value
>> > CheckForViewDataTest.TIMEOUT_STRING
>> >   File
>> > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>> > line 80, in until
>> > raise TimeoutException(message, screen, stacktrace)
>> > TimeoutException: Message: Timed out waiting for div element to appear
>> >
>> >
>> > --
>> >
>> >
>> > --
>> > 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
>
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python27 #143

2017-06-06 Thread pgAdmin 4 Jenkins
See 




-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4

2017-06-06 Thread Robert Eckhardt
On Tue, Jun 6, 2017 at 4:32 AM, Dave Page  wrote:

>
> For roll up this pattern seems obvious, identify the n partitions you
>> need/want to combine and then run a job to combine them.
>>
>
> You're thinking Greenplum :-). There is no roll up in PostgreSQL, unless
> you're thinking we should create such a feature in pgAdmin.
>
> Of course, I have no objection to extending what we do in PG to add GP
> feature support, but let's start with PG.
>

No not at all. That was a very specific and consistent pattern described by
users leveraging time based range partitions in Postgres. I'm not sure if
that same use case will be supported with partitioning as implemented in
Postgres 10 but it is a Postgres pattern.

-- Rob


>
>
>>
>> For other patterns such as creating indexes and such it requires a bit
>> more thought. Generally users described wanting to treat all of the
>> children like a single table (just like Oracle), however, other users
>> described potentially modifying chunks of partitions differently depending
>> on some criterion. This means that users will need to identify the subset
>> they want to optimize and then ideally be able to act on them all at once.
>>
>
> Right.
>
>
>>
>> -- Rob
>>
>>
>>
>>
>>
>>
>>>
>>> So... it sounds like we're on the right lines :-)
>>>
>>>

 For the former, this can be addressed by enabling users to modify one
 or more child partitions at the same time. For the latter, that is a
 workflow that might be addressed outside of the create table with partition
 workflow we're working on currently.





 On Mon, Jun 5, 2017 at 5:21 AM Dave Page  wrote:

> On Fri, Jun 2, 2017 at 9:01 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi All
>>
>> Following are the further implementation updates to support
>> Declarative Partitioning:
>>
>>- Show all the existing partitions of the parent table in
>>Partitions tab (Refer Existing_Partitions.png)
>>- Ability to create N partitions and detach existing partitions.
>>Refer (Create_Detach_Partition.png), in this example I have
>>detach two existing partition and create two new partitions.
>>- Added "Detach Partition" menu to partitions node only and user
>>will be able to detach from there as well. Refer (Detach.png)
>>
>> That's looking good to me :-)
>
>
>
>>
>>
>> On Wed, May 24, 2017 at 8:00 PM, Robert Eckhardt <
>> reckha...@pivotal.io> wrote:
>>
>>>
>>>
>>> On Wed, May 24, 2017 at 3:35 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>

Taking average of two columns is just an example/representation
 of expression, there is no use case of that. As I am also in learning
 phase. Below are some use case that I can think of:

-

Partitions based on first letter of their username

CREATE TABLE users (
id serial not null,
username   text not null,
password   text,
created_on timestamptz not null,
last_logged_on timestamptz not null
)PARTITION BY RANGE ( lower( left( username, 1 ) ) );
CREATE TABLE users_0
partition of users (id, primary key (id), unique (username))
for values from ('a') to ('g');
CREATE TABLE users_1
partition of users (id, primary key (id), unique (username))
for values from ('g') to (unbounded);

-  Partition based on country's sale for each month of an year.

 CREATE TABLE public.sales

 (

 country text NOT NULL,

 sales bigint NOT NULL,

 saledate date

 ) PARTITION BY RANGE (country, (extract (YEAR FROM saledate)),
 (extract(MONTH FROM saledate)))


 CREATE TABLE public.sale_usa_2017_jan PARTITION OF sales

 FOR VALUES FROM ('usa', 2017, 01) TO ('usa', 2017, 02);

 CREATE TABLE public.sale_india_2017_jan PARTITION OF sales

 FOR VALUES FROM ('india', 2017, 01) TO ('india', 2017, 02);

 CREATE TABLE public.sale_uk_2017_jan PARTITION OF sales

 FOR VALUES FROM ('uk', 2017, 01) TO ('uk', 2017, 02);


 INSERT INTO sales VALUES ('india', 1, '2017-1-15');

 INSERT INTO sales VALUES ('uk', 2, '2017-1-08');

 INSERT INTO sales VALUES ('usa', 3, '2017-1-10');

Apart from above there may be N number of use cases that depends
 on specific requirement of user.

>>>
>>> Thank you for the example, you are absolutely correct and we were
>>> confused.
>>

[pgadmin-hackers] Build failed in Jenkins: pgadmin4-master-python27 #142

2017-06-06 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Correct the validation logic when modifying indexes/exclusion

[Dave Page] Fix default values and SQL formatting for event triggers. Fixes 
#1229

[Dave Page] Fix validation for external and range types. Fixes #1795

[Dave Page] Ensure that boolean checkboxes cycle values in the correct order. 
Fixes

[Dave Page] Make $ quoting consistent. Fixes #1525

--
[...truncated 254.51 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_add.TypesAddTestCase)
Add type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_delete.TypesDeleteTestCase)
Delete type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_get.TypesGetTestCase)
Get type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_put.TypesUpdateTestCase)
Update type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependen

Re: [pgadmin-hackers] [pgAdmin4][PATCH] Display Security Labels in SQL (PPAS9.2+)

2017-06-06 Thread Dave Page
Thanks, applied.

On Fri, Jun 2, 2017 at 4:22 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to fix the issue where Security Labels were not displaying
> in Reversed engineered schema SQL for PPAS9.2+.
> RM#1575
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Properly display security labels on EPAS 9.2+. Fixes

2017-06-06 Thread Dave Page
Properly display security labels on EPAS 9.2+. Fixes #1575

Branch
--
master

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

Modified Files
--
.../schemas/templates/schema/ppas/9.2_plus/sql/properties.sql  | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To make $ quoting consistent

2017-06-06 Thread Dave Page
Thanks, patch applied.

On Fri, Jun 2, 2017 at 1:12 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to make to $ quoting consistent. in Function node
> RM#1525
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Make $ quoting consistent. Fixes #1525

2017-06-06 Thread Dave Page
Make $ quoting consistent. Fixes #1525

Branch
--
master

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

Modified Files
--
.../schemas/functions/templates/function/pg/sql/9.2_plus/create.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/9.2_plus/update.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/9.5_plus/create.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/9.5_plus/update.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/9.6_plus/create.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/9.6_plus/update.sql   | 4 ++--
.../schemas/functions/templates/function/pg/sql/default/create.sql| 4 ++--
.../schemas/functions/templates/function/pg/sql/default/update.sql| 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.2_plus/create.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.2_plus/update.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.5_plus/create.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.5_plus/update.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.6_plus/create.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/9.6_plus/update.sql | 4 ++--
.../schemas/functions/templates/function/ppas/sql/default/create.sql  | 4 ++--
.../schemas/functions/templates/function/ppas/sql/default/update.sql  | 4 ++--
16 files changed, 32 insertions(+), 32 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2448]: Multiple button presses to switch boolean fields

2017-06-06 Thread Dave Page
Thanks, applied.

On Fri, Jun 2, 2017 at 11:20 AM, Surinder Kumar
 wrote:
> Hi
>
> The behaviour for checkbox click will go "false -> true -> null ->"
>
> Please find attached patch and review.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python36 #136

2017-06-06 Thread pgAdmin 4 Jenkins
See 




-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Ensure that boolean checkboxes cycle values in the co

2017-06-06 Thread Dave Page
Ensure that boolean checkboxes cycle values in the correct order. Fixes #2448

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b82e00147879c2c3a670342263954bff72e211c9
Author: Surinder Kumar 

Modified Files
--
.../static/js/slickgrid/slick.pgadmin.editors.js   | 74 ++
1 file changed, 33 insertions(+), 41 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the validation in Types node

2017-06-06 Thread Dave Page
Thanks, applied.

On Fri, Jun 2, 2017 at 10:19 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the validation issues with Range & External type in Types
> node.
> RM#1795
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix validation for external and range types. Fixes #1

2017-06-06 Thread Dave Page
Fix validation for external and range types. Fixes #1795

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/types/__init__.py| 28 ++-
.../schemas/types/templates/type/js/type.js| 86 +++---
2 files changed, 83 insertions(+), 31 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix default values and SQL formatting for event trigg

2017-06-06 Thread Dave Page
Fix default values and SQL formatting for event triggers. Fixes #1229

Branch
--
master

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

Modified Files
--
.../server_groups/servers/databases/event_triggers/__init__.py| 2 ++
.../event_triggers/templates/event_triggers/js/event_trigger.js   | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the spacing issue in SQL for Event trigger

2017-06-06 Thread Dave Page
Thanks, applied.

On Fri, Jun 2, 2017 at 6:13 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to fix the issue of extra spacing in generated SQL in Event
> trigger.
> RM#1229
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue in index or exclusion contrarians node

2017-06-06 Thread Dave Page
Thanks applied.

On Wed, May 31, 2017 at 1:31 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the issue in index or exclusion contrarians node where it
> was throwing "can't execute an empty query" error due to incorrect
> validation logic for edit mode.
> RM#2113
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Correct the validation logic when modifying indexes/e

2017-06-06 Thread Dave Page
Correct the validation logic when modifying indexes/exclusion constraints. 
Fixes #2113

Branch
--
master

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

Modified Files
--
.../js/exclusion_constraint.js | 84 +-
.../tables/indexes/templates/index/js/index.js | 39 +-
2 files changed, 56 insertions(+), 67 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] [pgAdmin4][Patch][RM_2461]: Unable to drop defaut value from the column in table

2017-06-06 Thread Surinder Kumar
Hi

Add drop column syntax for dropping default value of a column if default
value is kept empty.

Please find attached patch and review.

Thanks,
Surinder


RM_2461.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Build failed in Jenkins: pgadmin4-master-python36 #135

2017-06-06 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Handle composite primary keys correctly when deleting rows in the 
Edit

--
[...truncated 254.58 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_add.TypesAddTestCase)
Add type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_delete.TypesDeleteTestCase)
Delete type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_get.TypesGetTestCase)
Get type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_put.TypesUpdateTestCase)
Update type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDe

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Fixed RM #2425 : Can't delete rows when using composite primary key

2017-06-06 Thread Dave Page
Thanks, applied.

On Wed, May 31, 2017 at 11:01 AM, Khushboo Vashi
 wrote:
> Hi,
>
> Please find the attached patch to fix RM #2425 :  Can't delete rows when
> using composite primary key.
>
> The grid selection checking for Primary key does not honour the composite
> key which has been fixed.
>
> Thanks,
> Khushboo
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Handle composite primary keys correctly when deleting

2017-06-06 Thread Dave Page
Handle composite primary keys correctly when deleting rows in the Edit Grid. 
Fixes #2425

Branch
--
master

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

Modified Files
--
.../sqleditor/templates/sqleditor/js/sqleditor.js| 20 
1 file changed, 12 insertions(+), 8 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To enable dialog help option for Language and Foreign table node

2017-06-06 Thread Dave Page
Thanks, applied.

On Wed, May 31, 2017 at 7:26 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to enable dialog help option for Language and Foreign table
> node.
> RM#2116
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Enable dialogue help buttons on Language and Foreign

2017-06-06 Thread Dave Page
Enable dialogue help buttons on Language and Foreign Table dialogues. Fixes 
#2116

Branch
--
master

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

Modified Files
--
.../servers/databases/languages/templates/languages/js/languages.js  | 1 +
.../schemas/foreign_tables/templates/foreign_tables/js/foreign_tables.js | 1 +
2 files changed, 2 insertions(+)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Properly refresh the parent node when renaming childr

2017-06-06 Thread Dave Page
Properly refresh the parent node when renaming children. Fixes #2355

Branch
--
master

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

Modified Files
--
.../server_groups/servers/databases/__init__.py|  35 +++-
.../browser/templates/browser/js/browser.js| 189 -
2 files changed, 181 insertions(+), 43 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4

2017-06-06 Thread Dave Page
On Mon, Jun 5, 2017 at 5:17 PM, Robert Eckhardt 
wrote:

> On Mon, Jun 5, 2017 at 11:45 AM, Dave Page  wrote:
>
>>
>>
>> The former is what I was bleating about when I said we needed to expose
>> partitions to the user. The latter isn't relevant - declarative
>> partitioning in Postgres doesn't use inheritance.
>>
>
> The former is certainly the most interesting.  We do need to expose the
> partitions but only exposing them individually might be a bit overwhelming.
> What we found was that the number of partitions users have, (given existing
> means of leveraging partitions) vary from ~100 up to 10k. Basically what we
> were thinking about was how we can create a workflow/interface that allows
> users to modify one or more children at once. Furthermore, it would be nice
> if we could figure out an easy (easy-ish) way for users to identify the one
> or more partitions that need to be modified.
>

Yes, that does need more thought.


>
> For roll up this pattern seems obvious, identify the n partitions you
> need/want to combine and then run a job to combine them.
>

You're thinking Greenplum :-). There is no roll up in PostgreSQL, unless
you're thinking we should create such a feature in pgAdmin.

Of course, I have no objection to extending what we do in PG to add GP
feature support, but let's start with PG.


>
> For other patterns such as creating indexes and such it requires a bit
> more thought. Generally users described wanting to treat all of the
> children like a single table (just like Oracle), however, other users
> described potentially modifying chunks of partitions differently depending
> on some criterion. This means that users will need to identify the subset
> they want to optimize and then ideally be able to act on them all at once.
>

Right.


>
> -- Rob
>
>
>
>
>
>
>>
>> So... it sounds like we're on the right lines :-)
>>
>>
>>>
>>> For the former, this can be addressed by enabling users to modify one or
>>> more child partitions at the same time. For the latter, that is a workflow
>>> that might be addressed outside of the create table with partition workflow
>>> we're working on currently.
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jun 5, 2017 at 5:21 AM Dave Page  wrote:
>>>
 On Fri, Jun 2, 2017 at 9:01 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi All
>
> Following are the further implementation updates to support
> Declarative Partitioning:
>
>- Show all the existing partitions of the parent table in
>Partitions tab (Refer Existing_Partitions.png)
>- Ability to create N partitions and detach existing partitions.
>Refer (Create_Detach_Partition.png), in this example I have detach
>two existing partition and create two new partitions.
>- Added "Detach Partition" menu to partitions node only and user
>will be able to detach from there as well. Refer (Detach.png)
>
> That's looking good to me :-)



>
>
> On Wed, May 24, 2017 at 8:00 PM, Robert Eckhardt  > wrote:
>
>>
>>
>> On Wed, May 24, 2017 at 3:35 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>Taking average of two columns is just an example/representation
>>> of expression, there is no use case of that. As I am also in learning
>>> phase. Below are some use case that I can think of:
>>>
>>>-
>>>
>>>Partitions based on first letter of their username
>>>
>>>CREATE TABLE users (
>>>id serial not null,
>>>username   text not null,
>>>password   text,
>>>created_on timestamptz not null,
>>>last_logged_on timestamptz not null
>>>)PARTITION BY RANGE ( lower( left( username, 1 ) ) );
>>>CREATE TABLE users_0
>>>partition of users (id, primary key (id), unique (username))
>>>for values from ('a') to ('g');
>>>CREATE TABLE users_1
>>>partition of users (id, primary key (id), unique (username))
>>>for values from ('g') to (unbounded);
>>>
>>>-  Partition based on country's sale for each month of an year.
>>>
>>> CREATE TABLE public.sales
>>>
>>> (
>>>
>>> country text NOT NULL,
>>>
>>> sales bigint NOT NULL,
>>>
>>> saledate date
>>>
>>> ) PARTITION BY RANGE (country, (extract (YEAR FROM saledate)),
>>> (extract(MONTH FROM saledate)))
>>>
>>>
>>> CREATE TABLE public.sale_usa_2017_jan PARTITION OF sales
>>>
>>> FOR VALUES FROM ('usa', 2017, 01) TO ('usa', 2017, 02);
>>>
>>> CREATE TABLE public.sale_india_2017_jan PARTITION OF sales
>>>
>>> FOR VALUES FROM ('india', 2017, 01) TO ('india', 2017, 02);
>>>
>>> CREATE TABLE public.sale_uk_2017_jan PARTITION OF sales
>>>
>>> FOR VALUES FROM ('uk', 2017, 01) TO ('uk', 2017, 02);
>>>

Re: [pgadmin-hackers] Re: [pgAdmin4][Patch][Feature #1971]: Remember column sizes between executions of the same query in the query tool

2017-06-06 Thread Surinder Kumar
Hi All,

Please find updated patch which includes Jasmine test cases for functions
getHash and calculateColumnWidth

Thanks,
Surinder

On Mon, Jun 5, 2017 at 11:38 PM, Shruti B Iyer  wrote:

> Hi Surinder!
>
> We reviewed this patch. The changes look good and we especially like that
> you have extracted out the new utility functions and the epicRandomString
> function too.
>
> This patch will likely affect the Query Results patch that is currently
> under review
> .
> In order to assist either us or yourself when making a merge between these
> patches, it would help to have jasmine unit testing for the two new
> functions, getHash and calculate_column_width.
>
> Also, we suggest that you rename calculate_column_width to
> calculateColumnWidth for consistency with javascript code style.
>
> Thanks,
> Shruti and Matt
>
> On Mon, Jun 5, 2017 at 9:16 AM Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Staged changes are missed in previous patch, so please ignore.
>> Please find attached updated patch.
>>
>> On Mon, Jun 5, 2017 at 4:29 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> This patch contains two fixes:
>>>
>>> 1) In Query/tool or Edit grid, the width of table column header is fixed
>>> depending on the column type(int, boolean, char etc.) due to which the
>>> column name or type appears cut from right and doesn't looks good from user
>>> point of view. The main concern was to display as much as the content of
>>> column should be displayed.
>>>
>>> Now the width of column is decided using the text length of column name
>>> or column type so that the column takes exact width it required and it
>>> don't appears cut.
>>>
>>> 2) Remember column size after re-running a query.
>>>
>>> The approach is to extract table name from the query executed and use it
>>> to store its columns width.
>>> Whenever the column(s) width of a table is adjusted, the corresponding
>>> values are updated into the object and used every time the same query is
>>> executed.
>>>
>>> If a query is executed for e.g:
>>>
>>> SELECT generate_series(1, 1000) as id, generate_series(1, 1000) as name,
>>> generate_series(1, 1000) as age
>>>
>>> ​it ​
>>> displays 3 columns
>>> ​but don't have any table name. In that case,
>>>  i use a hash generator function which returns unique hash for a query
>>> written in query editor and adjusted column(s) width are stored against
>>> that hash in object.
>>>
>>> Is there any way to get temporary table name(avoiding unique hash) for
>>> such queries ?​
>>>
>>> Also, Moved utilities functions into pgadmin/static/utils.js
>>>
>>> Please find attached patch and review.
>>>
>>> Thanks,
>>> Surinder Kumar
>>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>


Feature_1971_with_jasmine_tests.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers