[pgadmin-hackers] pgAdmin 4 commit: Use a different server name for unit vs. feature test

2017-05-02 Thread Dave Page
Use a different server name for unit vs. feature tests to avoid some observed 
conflicts.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4acecfa59a650369f14e1f61db8816e4eb13718a
Author: Sarah McAlear 

Modified Files
--
web/regression/feature_utils/base_feature_test.py | 4 
1 file changed, 4 insertions(+)


-- 
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][Patch] Rename feature test server

2017-05-02 Thread Dave Page
Thanks, applied.

On Thu, Apr 27, 2017 at 10:22 PM, Sarah McAlear  wrote:

> Hi Hackers!
>
> We realized that the feature tests and unit tests were using the same
> server, which was causing some flakiness when running the tests. This patch
> renames the server for the feature tests.
>
> Thanks!
> Joao & Sarah
>
>
>
>
> --
> 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: Test-suite OS compatability issue

2017-05-02 Thread Dave Page
Hi

When testing on Mac, the testsuite never exits with this patch applied. It
just hangs after printing the result summary.

On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hi Dave,
>
>  Please find the patch for OS compatability issue of test-suite.
>
> *Code Changes:*
>
> 1. Minor code changes done related to os module in
> *pgadmin4/web/regression/feature_utils/app_starter.py*
> 2. Code added in 
> pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
> *to handle path for SQL file.
> 3. Code added to convert unicode to string in some .py files.
>
> *Note:*
>  With python2.6.6 test-suite is failed to execute. I have
> created the RM 2367 
>
> Thank you!
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> 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


[pgadmin-hackers] pgAdmin 4 commit: Ensure errors thrown when deleting rows in the query

2017-05-02 Thread Dave Page
Ensure errors thrown when deleting rows in the query tool in edit mode are 
shown properly. Fixes #2356

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/sqleditor/command.py | 4 +++-
1 file changed, 3 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]: Delete row server error not shown to GUI user

2017-05-02 Thread Dave Page
Thanks, patch applied.

On Fri, Apr 28, 2017 at 11:48 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> The variable list_of_rowid doesn't keep track of rows to be deleted.
> If this list is empty simply return 0 since '_rowid' is being used to
> highlight the row for which error is occurred in only insert and update
> operation.
>
> 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


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values

2017-05-02 Thread Dave Page
Hi,

This is looking much better now :-). Couple of thoughts and a bug:

- Only the TextFormatter seems to handle both [null] and [default] values.
Shouldn't all formatters do so (including Json and Checkmark)? For example,
"serial" columns currently get displayed as [null] when left blank, but I
would expect to see [default].

- I would suggest we put [null] and [default] in a lighter colour - #99.

- With the feature test patch added, I seem to be consistently getting the
following failure (immediately after your new tests run):

==
ERROR: runTest
(pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool
--
Traceback (most recent call last):
  File
"/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 42, in setUp
self._screenshot()
  File
"/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 92, in _screenshot
python_version))
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 802, in get_screenshot_as_file
png = self.get_screenshot_as_png()
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 821, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 831, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)['value']
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 238, in execute
self.error_handler.check_response(response)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py",
line 193, in check_response
raise exception_class(message, screen, stacktrace)
UnexpectedAlertPresentException: Alert Text: None
Message: unexpected alert open: {Alert text : Are you sure you wish to
close the pgAdmin 4 browser?}
  (Session info: chrome=58.0.3029.81)
  (Driver info: chromedriver=2.29.461585
(0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3 x86_64)


==
ERROR: runTest
(pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Test table DDL generation
--
Traceback (most recent call last):
  File
"/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 42, in setUp
self._screenshot()
  File
"/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
line 92, in _screenshot
python_version))
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 802, in get_screenshot_as_file
png = self.get_screenshot_as_png()
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 821, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 831, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)['value']
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 238, in execute
self.error_handler.check_response(response)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py",
line 193, in check_response
raise exception_class(message, screen, stacktrace)
UnexpectedAlertPresentException: Alert Text: None
Message: unexpected alert open: {Alert text : Are you sure you wish to
close the pgAdmin 4 browser?}
  (Session info: chrome=58.0.3029.81)
  (Driver info: chromedriver=2.29.461585
(0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3 x86_64)

Thanks!


On Fri, Apr 28, 2017 at 10:19 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch for RM case and a separate patch for Feature
> tests.
>
> *Python:*
>
> - Added [default] label for cells with default values while inserting a
> new row.
>
> - Introduced a FieldValidator function for cells that don't allow null
> values. If user tries to insert null value, field with be highlighted with
> redborders around.
>
> ​-
> If a cell contains blank string('') and when we set it to null, the change
> into the cell is not detected. It was because the comparison
> for (defaultValue == null) return true if defaultValue is undefined. Hence
> _.isNull(valu

Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values

2017-05-02 Thread Surinder Kumar
Hi Dave,

On Tue, May 2, 2017 at 5:21 PM, Dave Page  wrote:

> Hi,
>
> This is looking much better now :-). Couple of thoughts and a bug:
>
> - Only the TextFormatter seems to handle both [null] and [default] values.
> Shouldn't all formatters do so (including Json and Checkmark)?
>
​Yes, I will apply the same changes for other formatters too.​

> For example, "serial" columns currently get displayed as [null] when left
> blank, but I would expect to see [default].
>
> - I would suggest we put [null] and [default] in a lighter colour -
> #99.
>
> - With the feature test patch added, I seem to be consistently getting the
> following failure (immediately after your new tests run):
>
> ==
> ERROR: runTest (pgadmin.feature_tests.xss_checks_panels_and_query_tool_
> test.CheckForXssFeatureTest)
> Test XSS check for panels and query tool
> --
> Traceback (most recent call last):
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
> line 42, in setUp
> self._screenshot()
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
> line 92, in _screenshot
> python_version))
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 802, in
> get_screenshot_as_file
> png = self.get_screenshot_as_png()
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 821, in
> get_screenshot_as_png
> return base64.b64decode(self.get_screenshot_as_base64().encode(
> 'ascii'))
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 831, in
> get_screenshot_as_base64
> return self.execute(Command.SCREENSHOT)['value']
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
> self.error_handler.check_response(response)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/errorhandler.py", line 193, in
> check_response
> raise exception_class(message, screen, stacktrace)
> UnexpectedAlertPresentException: Alert Text: None
> Message: unexpected alert open: {Alert text : Are you sure you wish to
> close the pgAdmin 4 browser?}
>   (Session info: chrome=58.0.3029.81)
>   (Driver info: chromedriver=2.29.461585 
> (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac
> OS X 10.12.3 x86_64)
>
>
> ==
> ERROR: runTest (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.
> CheckDebuggerForXssFeatureTest)
> Test table DDL generation
> --
> Traceback (most recent call last):
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
> line 42, in setUp
> self._screenshot()
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py",
> line 92, in _screenshot
> python_version))
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 802, in
> get_screenshot_as_file
> png = self.get_screenshot_as_png()
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 821, in
> get_screenshot_as_png
> return base64.b64decode(self.get_screenshot_as_base64().encode(
> 'ascii'))
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 831, in
> get_screenshot_as_base64
> return self.execute(Command.SCREENSHOT)['value']
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
> self.error_handler.check_response(response)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/errorhandler.py", line 193, in
> check_response
> raise exception_class(message, screen, stacktrace)
> UnexpectedAlertPresentException: Alert Text: None
> Message: unexpected alert open: {Alert text : Are you sure you wish to
> close the pgAdmin 4 browser?}
>   (Session info: chrome=58.0.3029.81)
>   (Driver info: chromedriver=2.29.461585 
> (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac
> OS X 10.12.3 x86_64)
>
​Sure. I will fix this.​

>
> Thanks!
>
>
> On Fri, Apr 28, 2017 at 10:19 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch for RM case and a separate patch for Feature
>> tests.
>>
>> *Python:*
>>
>> - Added [default] label for cells with default values while inserting a
>> new row.
>>
>> - Introduced a FieldValid

[pgadmin-hackers] pgadmin4 on PyPI

2017-05-02 Thread Markus Zapke-Gründemann
Hi,

thanks for creating pgAdmin 4! It's awesome that pgAdmin is now a web
application.

I installed pgAdmin 4 successfully from the PostgreSQL FTP[1] using pip.
I also tried to install it from PyPI, but the distribution hasn't been
upload there.

Having pgAdmin 4 available on PyPI would make the installation much more
easier, because one wouldn't have to add the PostgreSQL FTP URL to
install it.

With the URL changing with every release it's also a little bit more
work than necessary for the user to check for new releases and to
upgrade the configuration.

Finally services like pyup.io could help users to upgrade the version
automatically if would be on PyPI.

So what's needed to get pgAdmin 4 to PyPI? Or are there any general
reasons for not uploading it to PyPI?


Regards

Markus

[1] https://www.postgresql.org/ftp/pgadmin/pgadmin4/v1.4/pip/


-- 
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 on PyPI

2017-05-02 Thread Dave Page
Hi

On Tue, May 2, 2017 at 10:44 AM, Markus Zapke-Gründemann <
mar...@transcode.de> wrote:

> Hi,
>
> thanks for creating pgAdmin 4! It's awesome that pgAdmin is now a web
> application.
>

You're welcome.


>
> I installed pgAdmin 4 successfully from the PostgreSQL FTP[1] using pip.
> I also tried to install it from PyPI, but the distribution hasn't been
> upload there.
>
> Having pgAdmin 4 available on PyPI would make the installation much more
> easier, because one wouldn't have to add the PostgreSQL FTP URL to
> install it.
>
> With the URL changing with every release it's also a little bit more
> work than necessary for the user to check for new releases and to
> upgrade the configuration.
>
> Finally services like pyup.io could help users to upgrade the version
> automatically if would be on PyPI.
>
> So what's needed to get pgAdmin 4 to PyPI? Or are there any general
> reasons for not uploading it to PyPI?
>

Not enough cycles on my part really. It is on my todo list.

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

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


Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4

2017-05-02 Thread Dave Page
Hi

On Tue, May 2, 2017 at 2:46 PM, Akshay Joshi 
wrote:

> Hi All
>
> To implement Declarative Partitioning in existing Table dialog
> below changes should be implemented:
>
>1. *Icon: *As we have separate icon for view and materialised view, we
>should have for partition table. I didn't find any in font awesome.
>
> They are really different object types though (even having their own
collections), which isn't the case here. I'm not against having a slightly
modified icon, but I don't think it's necessary. Note that the object icons
come from pgAdmin III, and were custom designed for us. They aren't in font
awesome etc. We'd need to tweak one of the existing ones.

>
>1. *Inheritance*:
>   - A partition cannot have any parents other than the partitioned
>   table it is a partition of, nor can a regular table inherit from a
>   partitioned table making the latter its parent. That means partitioned
>   tables and partitions do not participate in inheritance with regular 
> tables.
>   - When user creates regular table then Inherited from table(s)
>   control should not display partitioned table.
>2. *Constraints*:
>   - Primary/Foreign/Unique/Exclusion constraints are not supported on
>   partitioned table. In that case respective controls should be disabled 
> for
>   partitioned table.
>   - We will have to check which constraints are applicable on
>   partitions(of partitioned table) still some R&D require. Can someone 
> help
>   me here.
>   - For regular tables in Foreign Key constraints tab References
>   control should not list partition tables.
>   - Check constraints : cannot add NO INHERIT constraint to
>   partitioned table, so that control is disabled for partition table.
>3. *Advanced Tab*:
>   - Relation works with partition table theirs is an error if "With
>   indexes?" is set to Yes, so we need to disabled that for partition 
> table.
>   - "Has OIDs?" and "Unlogged?" works but not sure about "Fill
>   factor" and "Of type".
>4. *Parameter Tab*:
>   - Gives error (unrecognized parameter "autovacuum_enabled") for all
>   parameters  of Table Tab and working fine for "Toast Table" it's
>   working.
>
> Can you detail what operations someone would likely want (or need) to
perform on the parent/child tables; e.g.

Parent:

- View stats
- View data
- Truncate
- View/create columns
- Bulk-create indexes
- Bulk-create foreign keys

Child:

- View stats
- View data
- Truncate
- Create indexes
- Create foreign keys



> Apart from above we will have to do following:
>
>- Required switch control to specify whether it is a regular table or
>partitioned table. I have added it on General tab. Please refer
>Partition_Switch.png
>- Will have to add new tab "Partition" which will have one select2
>control to define its Range partition or List partition. Refer
>Partition_Tab.png
>
> "Partitions"?

>
>- Design following controls in *Partition* tab:
>   - How to add columns in case of Range/List partition? LIST
>   partition key supports only one column. For RANGE user can specify 
> multiple
>   columns.
>   - How to specify expression, COLLATE while adding columns
>   for partition.
>   - We need subnode control so that user will add number of partition
>   with there values of the main table. Need lot of R&D for this.
>- We will have to provide "Create partition", "Attach Partition" and "
>Detech partition" context menu options on Partitions collection node.
>
> OK.

Thanks! This is a complex one :-(


> Let me know if I forgot something to add that we may need to
> handle/implement.
>
> On Thu, Apr 27, 2017 at 9:14 PM, Robert Eckhardt 
> wrote:
>
>> The issues we consistently face:

- The huge (often thousands sometimes tens of thousands) number of
partitions makes rendering all of the partitions painfully slow and
frequently not useful.

 Perhaps, though I doubt that number would be common in Postgres. The
>>> problem though, is that there are both stats and sub-objects (indexes and
>>> triggers for example) that are part of the child partitions, not the parent
>>> - and they may differ from partition to partition.
>>>
>>
>> Certainly there differences in Postgres and Greenplum and this might very
>> well be one of those places.
>>
>>
>>> I don't see that we have any choice but to display them so users can
>>> work with them.
>>>
>>
>> We don't want to hide them, I do think we want to make accessing them a
>> useful experience. If we rephrase this statement as "How might we display
>> partitioned tables so that users are able to work with and modify the
>> pieces they need?", this opens us up to different opportunities in how we
>> display them.
>>
>> Even with a simple case of 90 days of data partitioned by day, a drop
>> down showing 90 tables that are all mostly the same is a little
>> ov

Re: [pgadmin-hackers][patch] Dependents and Dependencies in GreenPlum

2017-05-02 Thread Sarah McAlear
Hi Hackers & Ashesh!

Is there anything else we can do for this?

Thanks!
Matt & Sarah

On Thu, Apr 27, 2017 at 10:37 AM, Joao Pedro De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Thanks for reviewing, Ashesh.
>
> We have updated the patch. The headers are all consistent and we removed
> the __init__.py files in directories containing only .sql.
>
> Thanks!
> Joao & Matt
>
> On Wed, Apr 26, 2017 at 11:22 AM, Joao Pedro De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hello Ashesh,
>>
>> Thanks for reviewing the patch.
>>
>> We added the __init__.py files into templates to convert them into
>> packages so that the tests inside of them can be found by the test runner.
>>
>> Thanks!
>> Joao & Sarah
>>
>> On Wed, Apr 26, 2017 at 1:26 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> On Mon, Apr 24, 2017 at 4:43 PM, Dave Page  wrote:
>>>
 Ashesh, can you review/commit this please?

 On Fri, Apr 21, 2017 at 8:42 PM, Joao Pedro De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
>
> We found out that when you are connected to a GreenPlum database and
> try to get Dependents and Dependencies of an object the application was
> returning a SQL error.
>
> This patch splits the SQL query used to retrieve the Dependents,
> Dependencies, and Roles SQL file into multiple versioned files.
> Add Unit Tests for each file.
> Also added __init__.py files to other test directories to run the
> tests in them.
>
 Hi Joao & Sarah,
>>>
>>> Why do we need to add __init__.py in the template directory?
>>> I didn't understand the purpose of the adding __init__.py files in the
>>> template directories.
>>>
>>> NOTE: The headers in those files are not consistent with the other
>>> project files.
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> 
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> 
>>>
 Add ORDER BY into Copy Selection Feature test to ensure the results are
> retrieved always in the same order
> Renamed the Scenario of the xss_checks_pgadmin_debugger_test and skip
> it for versions less than 9.1
>
> Thanks
>
> Joao & Sarah
>
>
> --
> 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] Declarative partitioning in pgAdmin4

2017-05-02 Thread Shirley Wang
On Tue, May 2, 2017 at 10:56 AM Dave Page  wrote:

> Hi
>
> On Tue, May 2, 2017 at 2:46 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi All
>>
>> To implement Declarative Partitioning in existing Table dialog
>> below changes should be implemented:
>>
>>1. *Icon: *As we have separate icon for view and materialised view,
>>we should have for partition table. I didn't find any in font awesome.
>>
>> They are really different object types though (even having their own
> collections), which isn't the case here. I'm not against having a slightly
> modified icon, but I don't think it's necessary. Note that the object icons
> come from pgAdmin III, and were custom designed for us. They aren't in font
> awesome etc. We'd need to tweak one of the existing ones.
>
>>
>>1. *Inheritance*:
>>   - A partition cannot have any parents other than the partitioned
>>   table it is a partition of, nor can a regular table inherit from a
>>   partitioned table making the latter its parent. That means partitioned
>>   tables and partitions do not participate in inheritance with regular 
>> tables.
>>   - When user creates regular table then Inherited from table(s)
>>   control should not display partitioned table.
>>2. *Constraints*:
>>   - Primary/Foreign/Unique/Exclusion constraints are not supported
>>   on partitioned table. In that case respective controls should be 
>> disabled
>>   for partitioned table.
>>   - We will have to check which constraints are applicable on
>>   partitions(of partitioned table) still some R&D require. Can someone 
>> help
>>   me here.
>>   - For regular tables in Foreign Key constraints tab References
>>   control should not list partition tables.
>>   - Check constraints : cannot add NO INHERIT constraint to
>>   partitioned table, so that control is disabled for partition table.
>>3. *Advanced Tab*:
>>   - Relation works with partition table theirs is an error if "With
>>   indexes?" is set to Yes, so we need to disabled that for partition 
>> table.
>>   - "Has OIDs?" and "Unlogged?" works but not sure about "Fill
>>   factor" and "Of type".
>>4. *Parameter Tab*:
>>   - Gives error (unrecognized parameter "autovacuum_enabled") for
>>   all parameters  of Table Tab and working fine for "Toast Table"
>>   it's working.
>>
>> Can you detail what operations someone would likely want (or need) to
> perform on the parent/child tables; e.g.
>
> Parent:
>
> - View stats
> - View data
> - Truncate
> - View/create columns
> - Bulk-create indexes
> - Bulk-create foreign keys
>
> Child:
>
> - View stats
> - View data
> - Truncate
> - Create indexes
> - Create foreign keys
>
>
>
>> Apart from above we will have to do following:
>>
>>- Required switch control to specify whether it is a regular table or
>>partitioned table. I have added it on General tab. Please refer
>>Partition_Switch.png
>>- Will have to add new tab "Partition" which will have one select2
>>control to define its Range partition or List partition. Refer
>>Partition_Tab.png
>>
>> "Partitions"?
>

Is there a reason why 'Partition' needs to open in a new tab? If there's
only one field, we should include it on the same page since the tabs don't
dictate necessary steps in a sequential order. Users will be able to find
what they need without navigating to another part of the dialog.

Example:
[image: tablepartition-1.png]
[image: tablepartition-2.png]


>>- Design following controls in *Partition* tab:
>>   - How to add columns in case of Range/List partition? LIST
>>   partition key supports only one column. For RANGE user can specify 
>> multiple
>>   columns.
>>   - How to specify expression, COLLATE while adding columns
>>   for partition.
>>   - We need subnode control so that user will add number of
>>   partition with there values of the main table. Need lot of R&D for 
>> this.
>>- We will have to provide "Create partition", "Attach Partition" and "
>>Detech partition" context menu options on Partitions collection node.
>>
>> OK.
>
> Thanks! This is a complex one :-(
>
>
>> Let me know if I forgot something to add that we may need to
>> handle/implement.
>>
>> On Thu, Apr 27, 2017 at 9:14 PM, Robert Eckhardt 
>> wrote:
>>
>>> The issues we consistently face:
>
>- The huge (often thousands sometimes tens of thousands) number of
>partitions makes rendering all of the partitions painfully slow and
>frequently not useful.
>
> Perhaps, though I doubt that number would be common in Postgres. The
 problem though, is that there are both stats and sub-objects (indexes and
 triggers for example) that are part of the child partitions, not the parent
 - and they may differ from partition to partition.

>>>
>>> Certainly there differences in Postgres and Greenplum and this might
>>> very well be one o

Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4

2017-05-02 Thread Akshay Joshi
Hi Shirley

On Wed, May 3, 2017 at 3:31 AM, Shirley Wang  wrote:

>
>
> On Tue, May 2, 2017 at 10:56 AM Dave Page  wrote:
>
>> Hi
>>
>> On Tue, May 2, 2017 at 2:46 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi All
>>>
>>> To implement Declarative Partitioning in existing Table dialog
>>> below changes should be implemented:
>>>
>>>1. *Icon: *As we have separate icon for view and materialised view,
>>>we should have for partition table. I didn't find any in font awesome.
>>>
>>> They are really different object types though (even having their own
>> collections), which isn't the case here. I'm not against having a slightly
>> modified icon, but I don't think it's necessary. Note that the object icons
>> come from pgAdmin III, and were custom designed for us. They aren't in font
>> awesome etc. We'd need to tweak one of the existing ones.
>>
>>>
>>>1. *Inheritance*:
>>>   - A partition cannot have any parents other than the partitioned
>>>   table it is a partition of, nor can a regular table inherit from a
>>>   partitioned table making the latter its parent. That means partitioned
>>>   tables and partitions do not participate in inheritance with regular 
>>> tables.
>>>   - When user creates regular table then Inherited from table(s)
>>>   control should not display partitioned table.
>>>2. *Constraints*:
>>>   - Primary/Foreign/Unique/Exclusion constraints are not supported
>>>   on partitioned table. In that case respective controls should be 
>>> disabled
>>>   for partitioned table.
>>>   - We will have to check which constraints are applicable on
>>>   partitions(of partitioned table) still some R&D require. Can someone 
>>> help
>>>   me here.
>>>   - For regular tables in Foreign Key constraints tab References
>>>   control should not list partition tables.
>>>   - Check constraints : cannot add NO INHERIT constraint to
>>>   partitioned table, so that control is disabled for partition table.
>>>3. *Advanced Tab*:
>>>   - Relation works with partition table theirs is an error if "With
>>>   indexes?" is set to Yes, so we need to disabled that for partition 
>>> table.
>>>   - "Has OIDs?" and "Unlogged?" works but not sure about "Fill
>>>   factor" and "Of type".
>>>4. *Parameter Tab*:
>>>   - Gives error (unrecognized parameter "autovacuum_enabled") for
>>>   all parameters  of Table Tab and working fine for "Toast Table"
>>>   it's working.
>>>
>>> Can you detail what operations someone would likely want (or need) to
>> perform on the parent/child tables; e.g.
>>
>> Parent:
>>
>> - View stats
>> - View data
>> - Truncate
>> - View/create columns
>> - Bulk-create indexes
>> - Bulk-create foreign keys
>>
>> Child:
>>
>> - View stats
>> - View data
>> - Truncate
>> - Create indexes
>> - Create foreign keys
>>
>>
>>
>>> Apart from above we will have to do following:
>>>
>>>- Required switch control to specify whether it is a regular table
>>>or partitioned table. I have added it on General tab. Please refer
>>>Partition_Switch.png
>>>- Will have to add new tab "Partition" which will have one select2
>>>control to define its Range partition or List partition. Refer
>>>Partition_Tab.png
>>>
>>> "Partitions"?
>>
>
> Is there a reason why 'Partition' needs to open in a new tab? If there's
> only one field, we should include it on the same page since the tabs don't
> dictate necessary steps in a sequential order. Users will be able to find
> what they need without navigating to another part of the dialog.
>

There are lots of controls yet to design like column(s), number of
partitions, partition schemes will be part of "Partitions" Tab. We will
need that.

>
> Example:
> [image: tablepartition-1.png]
> [image: tablepartition-2.png]
>
>
>>>- Design following controls in *Partition* tab:
>>>   - How to add columns in case of Range/List partition? LIST
>>>   partition key supports only one column. For RANGE user can specify 
>>> multiple
>>>   columns.
>>>   - How to specify expression, COLLATE while adding columns
>>>   for partition.
>>>   - We need subnode control so that user will add number of
>>>   partition with there values of the main table. Need lot of R&D for 
>>> this.
>>>- We will have to provide "Create partition", "Attach Partition" and
>>>"Detech partition" context menu options on Partitions collection
>>>node.
>>>
>>> OK.
>>
>> Thanks! This is a complex one :-(
>>
>>
>>> Let me know if I forgot something to add that we may need to
>>> handle/implement.
>>>
>>> On Thu, Apr 27, 2017 at 9:14 PM, Robert Eckhardt 
>>> wrote:
>>>
 The issues we consistently face:
>>
>>- The huge (often thousands sometimes tens of thousands) number
>>of partitions makes rendering all of the partitions painfully slow and
>>frequently not useful.
>>
>> Perhaps, though I 

Re: [pgadmin-hackers] pgAdmin4: Test-suite OS compatability issue

2017-05-02 Thread Navnath Gadakh
Hi Dave,

 I have applied and run this patch on Mac and it ran successfully
without hang up.

I used different OS:
   OS X Yosemite Version 10.10.2
   OS X EI Capitan Version 10.11.6

What is your system config?




On Tue, May 2, 2017 at 4:39 PM, Dave Page  wrote:

> Hi
>
> When testing on Mac, the testsuite never exits with this patch applied. It
> just hangs after printing the result summary.
>
> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>>  Please find the patch for OS compatability issue of test-suite.
>>
>> *Code Changes:*
>>
>> 1. Minor code changes done related to os module in
>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>> 2. Code added in 
>> pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>> *to handle path for SQL file.
>> 3. Code added to convert unicode to string in some .py files.
>>
>> *Note:*
>>  With python2.6.6 test-suite is failed to execute. I have
>> created the RM 2367 
>>
>> Thank you!
>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>> EnterpriseDB Corporation
>> 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
>



-- 
Regards,
Navnath Gadakh

EnterpriseDB Corporation
The Enterprise PostgreSQL Company