Re: [pgadmin-hackers] Qt runtime issue on python 3 + patch

2016-06-16 Thread Surinder Kumar
Hi Dave,

On Wed, Jun 15, 2016 at 10:48 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> On Wed, Jun 15, 2016 at 10:46 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Surinder,
>>
>> On Sat, Jun 11, 2016 at 11:08 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Sat, Jun 11, 2016 at 2:17 PM, Asser Schrøder Femø
>>>  wrote:
>>> > Hello pgadmin hackers,
>>> >
>>> > I checked out the newly released beta and wanted to see how easy it
>>> would be
>>> > to package for Arch Linux, but ran into this error with the Qt runtime:
>>> >
>>> > Python path:
>>> >
>>> "/home/asser/.virtualenvs/pgadmin4-python34/lib/python3.4/site-packages;/home/asser/src/pgadmin4-beta1/web"
>>> > Webapp path:  "/home/asser/projects/pgadmin4/web/pgAdmin4.py"
>>> > Traceback (most recent call last):
>>> >   File "/home/asser/projects/pgadmin4/web/pgAdmin4.py", line 23, in
>>> 
>>> > import config
>>> >   File "/home/asser/projects/pgadmin4/web/config.py", line 255, in
>>> 
>>> > from config_local import *
>>> >   File "", line 2237, in _find_and_load
>>> >   File "", line , in
>>> > _find_and_load_unlocked
>>> >   File "", line 2164, in _find_spec
>>> >   File "", line 1940, in find_spec
>>> >   File "", line 1914, in _get_spec
>>> >   File "", line 2049, in find_spec
>>> >   File "", line 53, in _path_join
>>> >   File "", line 53, in 
>>> > TypeError: 'str' does not support the buffer interface
>>> > "Failed to launch the application server, server thread exiting."
>>> >
>>> > According to Stackoverflow, exchanging PyBytes_FromString with
>>> > PyUnicode_DecodeFSDefault when building the pythonpath makes it work
>>> again
>>> > (see attached diff). I don't know why though, perhaps somebody will be
>>> able
>>> > to enlighten me :-)
>>> >
>>> > Same issue and fix on Python 3.4 and 3.5 on Arch Linux. I don't know
>>> if the
>>> > patch has any complications on other platforms.
>>>
>>> If I'm reading the docs right, PyUnicode_DecodeFSDefault was added in
>>> Python 3.3, so I've tweaked the patch a little (see attached). I know
>>> the current code has worked on some 3.x versions but I don't know
>>> which exactly as I don't currently have them here, but I'll bet it was
>>> 3.2 or below. Ashesh - can you have the most appropriate person from
>>> the team check this works on 3.0 through 3.5 please?
>>>
>> Can you please take a look at it?
>>
> Sure.
>

Following is the analaysis of compiling runtime environment on Ubuntu14.04
with various python versions.

*1. When compiled with Python-3.2*

It compiled successfully but on running pgAdmin4 executable it shows syntax
error:

(py32)surinder@ubuntu:~/Developments/pgadmin4/runtime$ echo $PYTHONPATH
:/home/surinder/.virtualenvs/py32/lib:/home/surinder/.virtualenvs/py32/lib/python3.2/site-packages

(py32)surinder@ubuntu:~/Developments/pgadmin4/runtime$ ./pgAdmin4
Python path:  ""
Webapp path:  "/home/surinder/Developments/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):
  File "/home/surinder/Developments/pgadmin4/web/pgAdmin4.py", line 24, in

from pgadmin import create_app
  File "/home/surinder/Developments/pgadmin4/web/pgadmin/__init__.py", line
254
if response.content_type == u'text/html; charset=utf-8':
  ^
SyntaxError: invalid syntax
"Failed to launch the application server, server thread exiting."

I got same error when I run pgAdmin4 with python installed from repository
and with python compiled from source.
Upon further investigation it seems to be encoding issue.

*2. pgAdmin4 compiled and run successfully on Python-3.3 & 3.4. *

I didn't face the error @asser is facing while running pgAdmin4.

>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>> > Thanks for building the successor to pgAdmin3! It already looks good
>>> and I'm
>>> > looking forward to further refinement. Hopefully I'll be able to
>>> contribute
>>> > a bit along the way.
>>>
>>> Cool - many 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] PATCH: To fix the issue using complex password

2016-06-16 Thread Dave Page
Thanks, patch applied.

On Thu, Jun 16, 2016 at 12:41 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to fix the issue while connecting server using complex
> password in pgAdmin4.
> RM#1371
>
>
> --
> 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 password encryption with non-alpha passwords. Fix

2016-06-16 Thread Dave Page
Fix password encryption with non-alpha passwords. Fixes #1371

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/crypto.py | 3 +--
1 file changed, 1 insertion(+), 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


[pgadmin-hackers] pgAdmin 4 commit: Figure out storage paths in a more Windows friendly w

2016-06-16 Thread Dave Page
Figure out storage paths in a more Windows friendly way. Fixes #1369

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5f3511ce390df7cc65f3f04f3b0194686d0dffaa

Modified Files
--
web/config.py | 15 +++
1 file changed, 11 insertions(+), 4 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] interesting bug gcc 6 and pgadmin3

2016-06-16 Thread Timon
with some investigation
https://bugzilla.redhat.com/show_bug.cgi?id=1344917

-- 
All bugs reserved


[pgadmin-hackers] pgAdmin 4 commit: Don't output the startup message in Desktop mode as i

2016-06-16 Thread Dave Page
Don't output the startup message in Desktop mode as it hangs the runtime
on Windows.

Branch
--
master

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

Modified Files
--
web/pgAdmin4.py | 7 ---
1 file changed, 4 insertions(+), 3 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: Do a more sensible venv search on Windows, and don't

2016-06-16 Thread Dave Page
Do a more sensible venv search on Windows, and don't update the
registry upon installation.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=73988bcecef9cea4a59fd5a18563948da2657769

Modified Files
--
Make.bat   |  3 +++
pkg/win32/installer.iss.in | 13 -
runtime/Server.cpp | 44 
3 files changed, 31 insertions(+), 29 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] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 3:28 PM, Ashesh Vashi
 wrote:
> On Thu, Jun 16, 2016 at 5:10 PM, Dave Page  wrote:
>>
>> On Thu, Jun 16, 2016 at 12:14 PM, Harshal Dhumal
>>  wrote:
>> > Hi,
>> >
>> > As per my offline discussion with Ashesh; He is suggesting not to use
>> > Function keys as shortcuts.
>>
>> Why? That is primarily what they are on the keyboard for.
>
> F5 is always bind to refresh function of the browser on linux & windows.
> Similarly - many shortcuts of browser are bound to the function keys.
>
> Hence - I asked not to use F5.

I suggested Ctrl+F5.

-- 
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] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Ashesh Vashi
On Thu, Jun 16, 2016 at 5:10 PM, Dave Page  wrote:

> On Thu, Jun 16, 2016 at 12:14 PM, Harshal Dhumal
>  wrote:
> > Hi,
> >
> > As per my offline discussion with Ashesh; He is suggesting not to use
> > Function keys as shortcuts.
>
> Why? That is primarily what they are on the keyboard for.
>
F5 is always bind to refresh function of the browser on linux & windows.
Similarly - many shortcuts of browser are bound to the function keys.

Hence - I asked not to use F5.

>
> > And regarding configurable key options, I suspect It is going to be time
> > consuming task, please let me know if you want me to start working it. Or
> > can we keep current shortcuts from my last patch?
>
> Surely we can come up with some simple ones that will be intuitive and
> work?
>
> >
> > On Thu, Jun 16, 2016 at 4:19 PM, Dave Page  wrote:
> >>
> >> Hi
> >>
> >> Hmm, I guess that's system dependent. What about Ctrl+F5? Or we bite
> >> the bullet and make it configurable.
> >>
> >> On Thu, Jun 16, 2016 at 11:47 AM, Harshal Dhumal
> >>  wrote:
> >> > Hi Dave,
> >> >
> >> > Function keys won't work properly with browser as they already have
> >> > predefined bindings.
> >> >
> >> > e.g.
> >> >
> >> > F5 for refresh (standard)
> >> > F7 for Caret Browsing in firefox
> >> >
> >> >
> >> > --
> >> > Harshal Dhumal
> >> > Software Engineer
> >> >
> >> > EnterpriseDB India: http://www.enterprisedb.com
> >> > The Enterprise PostgreSQL Company
> >> >
> >> > On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal
> >> >  wrote:
> >> >>
> >> >> Hi Dave,
> >> >>
> >> >> Ok, I'll change shortcut keys
> >> >>
> >> >> New shortcuts would be:
> >> >>
> >> >> Execute  -->   F5
> >> >> Explain  -->F7
> >> >> Explain analyze  --> Shift+F7
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Harshal Dhumal
> >> >> Software Engineer
> >> >>
> >> >> EnterpriseDB India: http://www.enterprisedb.com
> >> >> The Enterprise PostgreSQL Company
> >> >>
> >> >> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page 
> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
> >> >>> significantly less convenient than F5.
> >> >>>
> >> >>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
> >> >>>  wrote:
> >> >>> > Hi,
> >> >>> >
> >> >>> > PAF patch for issue RM1336
> >> >>> >
> >> >>> > Changes: Added keyboard shortcuts (static/non configurable) to
> some
> >> >>> > query
> >> >>> > tool operations.
> >> >>> >
> >> >>> > Execute  -->   Ctrl + Shift + E
> >> >>> > Explain  -->Ctrl + Shift + X
> >> >>> > Explain analyze  -->   Ctrl + Shift + A
> >> >>> >
> >> >>> > Note: Keyboard shortcuts do not work if focus is set on any
> disabled
> >> >>> > button
> >> >>> > inside query tool or out side the query tool.
> >> >>> >
> >> >>> >
> >> >>> > --
> >> >>> > Harshal Dhumal
> >> >>> > Software Engineer
> >> >>> >
> >> >>> > EnterpriseDB India: 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
> >> >>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> 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
>


Re: [pgadmin-hackers] Patches

2016-06-16 Thread Sandeep Thakkar
On Thu, Jun 16, 2016 at 7:04 PM, Dave Page  wrote:

> On Thu, Jun 16, 2016 at 11:40 AM, Sandeep Thakkar
>  wrote:
> >
> >
> >> > I have attached the patch (pgadminpro.patch) to fix this.
> >>
> >> Configuration and build fails for me with this:
> >>
> > yeah, the 'contains' function is trying to match the whole string.
> Replacing
> > that line in the patch with "contains( LIBS, -lpython2.* )" should work
> > fine.
>
> Nope - it looks like it's messing up the detection of python-config
> vs. python3-config. I'm beginning to think it only worked before
> because of the -lpython2.7 line you (quite rightly) removed. With the
> attached version of the patch, I get this output:
>
> Project MESSAGE: Building for QT5+...
> Project MESSAGE: Configure pgAdmin4 to run in debug mode...
> Project MESSAGE: Building for Linux/Mac...
> Project MESSAGE: Using python3-config
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
> Project MESSAGE: Python3 detected.
>
> Interesting. It seems the system command in the pro file "*!system(which
python3-config > /dev/null 2>&1)** {*" is itself not working at your end. As
you mentioned earlier python3-config does not exist in your path and so
`which python3-config` should not return anything. But as per the above
output, it seems it is trying to execute python3-config and hence we can
see command not found error. and therefore it goes in else and printing
message(Using python3-config).. I'm not sure what is wrong.


> >> This second patch breaks builds for me:
> >>
> > This is strange because I just added a new option "--always-copy" to
> > virtualenv. What is your path to virtualenv? Could you please try running
> > 'virtualenv -v  --always-copy -p
> > /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
> > /tmp/venv'
>
> Hmm.. so, the virtualenv on your mac is not working with "--always-copy"
option. I will check again if we still need it (for Python3).


> (pgadmin4)piranha:pgAdmin4 dpage$ virtualenv -v  --always-copy -p
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
> /tmp/venv
> Running virtualenv with interpreter
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
> Creating /tmp/venv/lib/python2.7
> Symlinking Python bootstrap modules
>   Copying to /tmp/venv/lib/python2.7/config
> Traceback (most recent call last):
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 2311, in
> 
> main()
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 703, in main
> symlink=options.symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 916, in
> create_environment
> site_packages=site_packages, clear=clear, symlink=symlink))
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line ,
> in install_python
> copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 352, in
> copyfile
> copyfileordir(src, dest, symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 324, in
> copyfileordir
> shutil.copytree(src, dest, symlink)
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
> line 208, in copytree
> raise Error, errors
> shutil.Error:
> [('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c',
> '/tmp/venv/lib/python2.7/config/config.c', "[Errno 1] Operation not
> permitted: '/tmp/venv/lib/python2.7/config/config.c'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/
> config.c.in',
> '/tmp/venv/lib/python2.7/config/config.c.in', "[Errno 1] Operation not
> permitted: '/tmp/venv/lib/python2.7/config/config.c.in'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/install-sh',
> '/tmp/venv/lib/python2.7/config/install-sh', "[Errno 1] Operation not
> permitted: '/tmp/venv/lib/python2.7/config/install-sh'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.a',
> '/tmp/venv/lib/python2.7/config/libpython2.7.a', "[Errno 1] Operation
> not permitted: '/tmp/venv/lib/python2.7/config/libpython2.7.a'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib',
> '/tmp/venv/lib/python2.7/config/libpython2.7.dylib', "[Errno 1]
> Operation not permitted:
> '/tmp/venv/lib/python2.7/config/libpython2.7.dylib'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile',
> '/tmp/venv/lib/python2.7/config/Makefile', "[Errno 1] Operation not
> permitted: '/tmp/venv/lib/python2.7/config/Makefile'"),
>
> ('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/makesetup',
> '/tmp/venv/lib/python2.7/config/makesetup', "[Errno 1] Operation not
> 

[pgadmin-hackers] pgAdmin 4 commit: Remove recusive call of _wait_timeout() due to which

2016-06-16 Thread Akshay Joshi
Remove recusive call of _wait_timeout() due to which python server is crashing

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=fc295f94a3712d857c353853ffab33ee02db30fb
Author: Ashesh Vashi 

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 27 ++-
1 file changed, 22 insertions(+), 5 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] Patches

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 11:40 AM, Sandeep Thakkar
 wrote:
>
>
>> > I have attached the patch (pgadminpro.patch) to fix this.
>>
>> Configuration and build fails for me with this:
>>
> yeah, the 'contains' function is trying to match the whole string. Replacing
> that line in the patch with "contains( LIBS, -lpython2.* )" should work
> fine.

Nope - it looks like it's messing up the detection of python-config
vs. python3-config. I'm beginning to think it only worked before
because of the -lpython2.7 line you (quite rightly) removed. With the
attached version of the patch, I get this output:

Project MESSAGE: Building for QT5+...
Project MESSAGE: Configure pgAdmin4 to run in debug mode...
Project MESSAGE: Building for Linux/Mac...
Project MESSAGE: Using python3-config
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found
Project MESSAGE: Python3 detected.


>> This second patch breaks builds for me:
>>
> This is strange because I just added a new option "--always-copy" to
> virtualenv. What is your path to virtualenv? Could you please try running
> 'virtualenv -v  --always-copy -p
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
> /tmp/venv'

(pgadmin4)piranha:pgAdmin4 dpage$ virtualenv -v  --always-copy -p
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
/tmp/venv
Running virtualenv with interpreter
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
Creating /tmp/venv/lib/python2.7
Symlinking Python bootstrap modules
  Copying to /tmp/venv/lib/python2.7/config
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 2311, in 
main()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 703, in main
symlink=options.symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 916, in
create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
  File "/Library/Python/2.7/site-packages/virtualenv.py", line ,
in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 352, in copyfile
copyfileordir(src, dest, symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 324, in
copyfileordir
shutil.copytree(src, dest, symlink)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 208, in copytree
raise Error, errors
shutil.Error: 
[('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c',
'/tmp/venv/lib/python2.7/config/config.c', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/config.c'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c.in',
'/tmp/venv/lib/python2.7/config/config.c.in', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/config.c.in'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/install-sh',
'/tmp/venv/lib/python2.7/config/install-sh', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/install-sh'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.a',
'/tmp/venv/lib/python2.7/config/libpython2.7.a', "[Errno 1] Operation
not permitted: '/tmp/venv/lib/python2.7/config/libpython2.7.a'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib',
'/tmp/venv/lib/python2.7/config/libpython2.7.dylib', "[Errno 1]
Operation not permitted:
'/tmp/venv/lib/python2.7/config/libpython2.7.dylib'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile',
'/tmp/venv/lib/python2.7/config/Makefile', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/Makefile'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/makesetup',
'/tmp/venv/lib/python2.7/config/makesetup', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/makesetup'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/python.o',
'/tmp/venv/lib/python2.7/config/python.o', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/python.o'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Setup',
'/tmp/venv/lib/python2.7/config/Setup', "[Errno 1] Operation not
permitted: '/tmp/venv/lib/python2.7/config/Setup'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Setup.config',
'/tmp/venv/lib/python2.7/config/Setup.config', "[Errno 1] Operation
not permitted: '/tmp/venv/lib/python2.7/config/Setup.config'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Setup.local',
'/tmp/venv/lib/python2.7/config/Setup.local', "[Errno 1] Operation not
permitted: 

Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 1:43 PM, Akshay Joshi  wrote:

>
>
> On Thu, Jun 16, 2016 at 6:09 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 1:34 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 5:47 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Thu, Jun 16, 2016 at 5:07 PM, Dave Page  wrote:

>
>
> On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi  wrote:

>
>
> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page 
> wrote:
>
>> Thanks, patch applied.
>>
>> However, whilst I was testing, I saw just how slow the tool is:
>>
>> SELECT * FROM pg_attribute
>>
>> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed
>> at 676ms on my laptop. In pgAdmin 4, the busy spinner runs for 
>> approx 5
>> seconds, then the whole UI freezes. I then have to wait a further 3 
>> minutes
>> and 46 seconds() for the operation to complete. Once loaded, 
>> scrolling
>> is very sluggish.
>>
>> Please make this your top priority - and if you have incremental
>> improvements, send them as you have them.
>>
>
>Sure.
>

   Below is my initial finding while running "SELECT * FROM
 pg_attribute" on PEM database, returns 8498 rows:

- Fetching data from the server side took consistent time and
it took 3-4 secs.
- Create/Render Backgrid without pagination : *1 minute*
- Create/Render Backgrid with pagination (50 items per page):
*469ms*
- Create/Render Backgrid with pagination (500 items per page): *3
secs*
- Create/Render Backgrid with pagination (1000 items per page): *6
secs*
- Create/Render Backgrid with pagination (3000 items per page):
*22 secs*
- Create/Render Backgrid with pagination (5000 items per page): *36
secs*


>>> OK, so I guess diving into Backgrid is the next step. Are there any
>>> profiling tools that could be used?
>>>
>>>
>>
>> Can we use infinity scrolling in case of no pagination?
>>
>
> How would add row work then?
>

 Yeah, in this case user has to wait till the last record to load. :(
 Btw, I was thinking of https://github.com/bhvaleri/backgrid-infinator

>>>
>>> This seems to be the good option.
>>>
>>
>> No - please see my previous comment.
>>
>
> We can add/paste row as top row of the backgrid. In that case will it
> be fine?
>

It's a hack, it doesn't solve the underlying problem. The fact that it took
4 minutes to load 8000 rows on my top-of-the-range MacBook Pro is not good.

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

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


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Akshay Joshi
On Thu, Jun 16, 2016 at 6:09 PM, Dave Page  wrote:

>
>
> On Thu, Jun 16, 2016 at 1:34 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 5:47 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 5:07 PM, Dave Page  wrote:
>>>


 On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi >> enterprisedb.com> wrote:
>>>


 On Thu, Jun 16, 2016 at 2:35 PM, Dave Page 
 wrote:

> Thanks, patch applied.
>
> However, whilst I was testing, I saw just how slow the tool is:
>
> SELECT * FROM pg_attribute
>
> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed
> at 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 
> 5
> seconds, then the whole UI freezes. I then have to wait a further 3 
> minutes
> and 46 seconds() for the operation to complete. Once loaded, 
> scrolling
> is very sluggish.
>
> Please make this your top priority - and if you have incremental
> improvements, send them as you have them.
>

Sure.

>>>
>>>   Below is my initial finding while running "SELECT * FROM
>>> pg_attribute" on PEM database, returns 8498 rows:
>>>
>>>- Fetching data from the server side took consistent time and it
>>>took 3-4 secs.
>>>- Create/Render Backgrid without pagination : *1 minute*
>>>- Create/Render Backgrid with pagination (50 items per page):
>>>*469ms*
>>>- Create/Render Backgrid with pagination (500 items per page): *3
>>>secs*
>>>- Create/Render Backgrid with pagination (1000 items per page): *6
>>>secs*
>>>- Create/Render Backgrid with pagination (3000 items per page):
>>>*22 secs*
>>>- Create/Render Backgrid with pagination (5000 items per page): *36
>>>secs*
>>>
>>>
>> OK, so I guess diving into Backgrid is the next step. Are there any
>> profiling tools that could be used?
>>
>>
>
> Can we use infinity scrolling in case of no pagination?
>

 How would add row work then?

>>>
>>> Yeah, in this case user has to wait till the last record to load. :(
>>> Btw, I was thinking of https://github.com/bhvaleri/backgrid-infinator
>>>
>>
>> This seems to be the good option.
>>
>
> No - please see my previous comment.
>

We can add/paste row as top row of the backgrid. In that case will it
be fine?

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



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 1:34 PM, Akshay Joshi  wrote:

>
>
> On Thu, Jun 16, 2016 at 5:47 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 5:07 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:

>
>
> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi > enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page 
>>> wrote:
>>>
 Thanks, patch applied.

 However, whilst I was testing, I saw just how slow the tool is:

 SELECT * FROM pg_attribute

 In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed
 at 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
 seconds, then the whole UI freezes. I then have to wait a further 3 
 minutes
 and 46 seconds() for the operation to complete. Once loaded, 
 scrolling
 is very sluggish.

 Please make this your top priority - and if you have incremental
 improvements, send them as you have them.

>>>
>>>Sure.
>>>
>>
>>   Below is my initial finding while running "SELECT * FROM
>> pg_attribute" on PEM database, returns 8498 rows:
>>
>>- Fetching data from the server side took consistent time and it
>>took 3-4 secs.
>>- Create/Render Backgrid without pagination : *1 minute*
>>- Create/Render Backgrid with pagination (50 items per page):
>>*469ms*
>>- Create/Render Backgrid with pagination (500 items per page): *3
>>secs*
>>- Create/Render Backgrid with pagination (1000 items per page): *6
>>secs*
>>- Create/Render Backgrid with pagination (3000 items per page):
>>*22 secs*
>>- Create/Render Backgrid with pagination (5000 items per page): *36
>>secs*
>>
>>
> OK, so I guess diving into Backgrid is the next step. Are there any
> profiling tools that could be used?
>
>

 Can we use infinity scrolling in case of no pagination?

>>>
>>> How would add row work then?
>>>
>>
>> Yeah, in this case user has to wait till the last record to load. :(
>> Btw, I was thinking of https://github.com/bhvaleri/backgrid-infinator
>>
>
> This seems to be the good option.
>

No - please see my previous comment.

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

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


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Akshay Joshi
On Thu, Jun 16, 2016 at 5:47 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Jun 16, 2016 at 5:07 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:
>>>


 On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi  enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:
>>
>>> Thanks, patch applied.
>>>
>>> However, whilst I was testing, I saw just how slow the tool is:
>>>
>>> SELECT * FROM pg_attribute
>>>
>>> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
>>> 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
>>> seconds, then the whole UI freezes. I then have to wait a further 3 
>>> minutes
>>> and 46 seconds() for the operation to complete. Once loaded, 
>>> scrolling
>>> is very sluggish.
>>>
>>> Please make this your top priority - and if you have incremental
>>> improvements, send them as you have them.
>>>
>>
>>Sure.
>>
>
>   Below is my initial finding while running "SELECT * FROM
> pg_attribute" on PEM database, returns 8498 rows:
>
>- Fetching data from the server side took consistent time and it
>took 3-4 secs.
>- Create/Render Backgrid without pagination : *1 minute*
>- Create/Render Backgrid with pagination (50 items per page):
>*469ms*
>- Create/Render Backgrid with pagination (500 items per page): *3
>secs*
>- Create/Render Backgrid with pagination (1000 items per page): *6
>secs*
>- Create/Render Backgrid with pagination (3000 items per page):
>*22 secs*
>- Create/Render Backgrid with pagination (5000 items per page): *36
>secs*
>
>
 OK, so I guess diving into Backgrid is the next step. Are there any
 profiling tools that could be used?


>>>
>>> Can we use infinity scrolling in case of no pagination?
>>>
>>
>> How would add row work then?
>>
>
> Yeah, in this case user has to wait till the last record to load. :(
> Btw, I was thinking of https://github.com/bhvaleri/backgrid-infinator
>

This seems to be the good option.

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


-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Khushboo Vashi
On Thu, Jun 16, 2016 at 5:07 PM, Dave Page  wrote:

>
>
> On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi  wrote:

>
>
> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:
>
>> Thanks, patch applied.
>>
>> However, whilst I was testing, I saw just how slow the tool is:
>>
>> SELECT * FROM pg_attribute
>>
>> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
>> 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
>> seconds, then the whole UI freezes. I then have to wait a further 3 
>> minutes
>> and 46 seconds() for the operation to complete. Once loaded, 
>> scrolling
>> is very sluggish.
>>
>> Please make this your top priority - and if you have incremental
>> improvements, send them as you have them.
>>
>
>Sure.
>

   Below is my initial finding while running "SELECT * FROM
 pg_attribute" on PEM database, returns 8498 rows:

- Fetching data from the server side took consistent time and it
took 3-4 secs.
- Create/Render Backgrid without pagination : *1 minute*
- Create/Render Backgrid with pagination (50 items per page):
*469ms*
- Create/Render Backgrid with pagination (500 items per page): *3
secs*
- Create/Render Backgrid with pagination (1000 items per page): *6
secs*
- Create/Render Backgrid with pagination (3000 items per page):
*22 secs*
- Create/Render Backgrid with pagination (5000 items per page): *36
secs*


>>> OK, so I guess diving into Backgrid is the next step. Are there any
>>> profiling tools that could be used?
>>>
>>>
>>
>> Can we use infinity scrolling in case of no pagination?
>>
>
> How would add row work then?
>

Yeah, in this case user has to wait till the last record to load. :(
Btw, I was thinking of https://github.com/bhvaleri/backgrid-infinator

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


[pgadmin-hackers] pgAdmin 4 commit: Hunt for the runtime on Windows in the same way we do

2016-06-16 Thread Dave Page
Hunt for the runtime on Windows in the same way we do on Mac.

Branch
--
master

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

Modified Files
--
runtime/Server.cpp | 30 ++
1 file changed, 30 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: Improve the reliability of the Windows build system.

2016-06-16 Thread Dave Page
Improve the reliability of the Windows build system.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=931f671756d43ea7d22d460fcb4c7a815a5aad11

Modified Files
--
Make.bat | 26 +-
1 file changed, 13 insertions(+), 13 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] PATCH: To fix the issue in date validation in role

2016-06-16 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix the issue of date validation while creating new role.
RM#1370

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM_1370.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] PATCH: To fix the issue using complex password

2016-06-16 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix the issue while connecting server using complex
password in pgAdmin4.
RM#1371


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM_1371.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


Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 12:14 PM, Harshal Dhumal
 wrote:
> Hi,
>
> As per my offline discussion with Ashesh; He is suggesting not to use
> Function keys as shortcuts.

Why? That is primarily what they are on the keyboard for.

> And regarding configurable key options, I suspect It is going to be time
> consuming task, please let me know if you want me to start working it. Or
> can we keep current shortcuts from my last patch?

Surely we can come up with some simple ones that will be intuitive and work?

>
> On Thu, Jun 16, 2016 at 4:19 PM, Dave Page  wrote:
>>
>> Hi
>>
>> Hmm, I guess that's system dependent. What about Ctrl+F5? Or we bite
>> the bullet and make it configurable.
>>
>> On Thu, Jun 16, 2016 at 11:47 AM, Harshal Dhumal
>>  wrote:
>> > Hi Dave,
>> >
>> > Function keys won't work properly with browser as they already have
>> > predefined bindings.
>> >
>> > e.g.
>> >
>> > F5 for refresh (standard)
>> > F7 for Caret Browsing in firefox
>> >
>> >
>> > --
>> > Harshal Dhumal
>> > Software Engineer
>> >
>> > EnterpriseDB India: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>> >
>> > On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal
>> >  wrote:
>> >>
>> >> Hi Dave,
>> >>
>> >> Ok, I'll change shortcut keys
>> >>
>> >> New shortcuts would be:
>> >>
>> >> Execute  -->   F5
>> >> Explain  -->F7
>> >> Explain analyze  --> Shift+F7
>> >>
>> >>
>> >>
>> >> --
>> >> Harshal Dhumal
>> >> Software Engineer
>> >>
>> >> EnterpriseDB India: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >>
>> >> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
>> >>> significantly less convenient than F5.
>> >>>
>> >>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
>> >>>  wrote:
>> >>> > Hi,
>> >>> >
>> >>> > PAF patch for issue RM1336
>> >>> >
>> >>> > Changes: Added keyboard shortcuts (static/non configurable) to some
>> >>> > query
>> >>> > tool operations.
>> >>> >
>> >>> > Execute  -->   Ctrl + Shift + E
>> >>> > Explain  -->Ctrl + Shift + X
>> >>> > Explain analyze  -->   Ctrl + Shift + A
>> >>> >
>> >>> > Note: Keyboard shortcuts do not work if focus is set on any disabled
>> >>> > button
>> >>> > inside query tool or out side the query tool.
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Harshal Dhumal
>> >>> > Software Engineer
>> >>> >
>> >>> > EnterpriseDB India: 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
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> 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


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 12:19 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi >> .com> wrote:
>>>


 On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:

> Thanks, patch applied.
>
> However, whilst I was testing, I saw just how slow the tool is:
>
> SELECT * FROM pg_attribute
>
> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
> 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
> seconds, then the whole UI freezes. I then have to wait a further 3 
> minutes
> and 46 seconds() for the operation to complete. Once loaded, scrolling
> is very sluggish.
>
> Please make this your top priority - and if you have incremental
> improvements, send them as you have them.
>

Sure.

>>>
>>>   Below is my initial finding while running "SELECT * FROM
>>> pg_attribute" on PEM database, returns 8498 rows:
>>>
>>>- Fetching data from the server side took consistent time and it
>>>took 3-4 secs.
>>>- Create/Render Backgrid without pagination : *1 minute*
>>>- Create/Render Backgrid with pagination (50 items per page):
>>>*469ms*
>>>- Create/Render Backgrid with pagination (500 items per page): *3
>>>secs*
>>>- Create/Render Backgrid with pagination (1000 items per page): *6
>>>secs*
>>>- Create/Render Backgrid with pagination (3000 items per page):
>>>*22 secs*
>>>- Create/Render Backgrid with pagination (5000 items per page): *36
>>>secs*
>>>
>>>
>> OK, so I guess diving into Backgrid is the next step. Are there any
>> profiling tools that could be used?
>>
>>
>
> Can we use infinity scrolling in case of no pagination?
>

How would add row work then?

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

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


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Khushboo Vashi
On Thu, Jun 16, 2016 at 4:42 PM, Dave Page  wrote:

>
>
> On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi > .com> wrote:
>>
>>>
>>>
>>> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:
>>>
 Thanks, patch applied.

 However, whilst I was testing, I saw just how slow the tool is:

 SELECT * FROM pg_attribute

 In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
 seconds, then the whole UI freezes. I then have to wait a further 3 minutes
 and 46 seconds() for the operation to complete. Once loaded, scrolling
 is very sluggish.

 Please make this your top priority - and if you have incremental
 improvements, send them as you have them.

>>>
>>>Sure.
>>>
>>
>>   Below is my initial finding while running "SELECT * FROM
>> pg_attribute" on PEM database, returns 8498 rows:
>>
>>- Fetching data from the server side took consistent time and it took
>>3-4 secs.
>>- Create/Render Backgrid without pagination : *1 minute*
>>- Create/Render Backgrid with pagination (50 items per page):  *469ms*
>>- Create/Render Backgrid with pagination (500 items per page): *3
>>secs*
>>- Create/Render Backgrid with pagination (1000 items per page): *6
>>secs*
>>- Create/Render Backgrid with pagination (3000 items per page):
>>*22 secs*
>>- Create/Render Backgrid with pagination (5000 items per page): *36
>>secs*
>>
>>
> OK, so I guess diving into Backgrid is the next step. Are there any
> profiling tools that could be used?
>
>

Can we use infinity scrolling in case of no pagination?

>
>>-
>>
>>
 On Wed, Jun 15, 2016 at 4:50 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi
>
> Please ignore the last patch. Attached is the latest patch. Please
> review it.
>
> On Wed, Jun 15, 2016 at 9:10 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi
>>
>> On Wed, Jun 15, 2016 at 5:54 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 1:16 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 On Wed, Jun 15, 2016 at 5:44 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

>
>
> On Wed, Jun 15, 2016 at 5:25 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> On Wed, Jun 15, 2016 at 11:27 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> I have fixed RM #1356 "Query tool enhancement". I have added the
>>> logic to preferences which checks the min/max value before setting 
>>> it. If
>>> value given by user is less than min value then set it to min value 
>>> and if
>>> value is greater then max value then set it to max value.
>>>
>>> For "items_per_page" minimum value is 1. Attached is the patch
>>> file. Please review it.
>>>
>>
>> That doesn't do what I asked for though. A value of zero should
>> be acceptable (I did say <= 0, but = 0 is probably better), and mean
>> 'disable paging' (i.e. display unlimited rows, and completely hide 
>> the
>> paging controls). From the ticket:
>>
>> 1) If "Items per page in grid" <= 0, then never page results. Add
>> a note to that effect on the Preferences pane, and make zero the 
>> default
>> value.
>>
>> The patch does appear to implement:
>>
>
> Backbone's Pageble Collection don't allow Zero value. Below is
> the check present in "backbone.paginator.js" file:
>
> if (pageSize < 1) {
>   throw new RangeError("`pageSize` must be >= 1");
> }
>
 We can avoid using the Pageable Collection in our code, when
 pageSize is <= 0 to fix the issue.

>>>
>>> Exactly. The entire point of the change is to default to not paging
>>> at all.
>>>
>>> BTW, this may be helpful (also missed from the original patch):
>>>
>>> help_str=gettext('The number of rows to display per page in the
>>> results grid. A value of 0 will disable paging.'),
>>>
>>
>>Fixed above as per suggestion. Attached is the modified patch
>> file. Please review it.
>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> 

Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Harshal Dhumal
Hi,

As per my offline discussion with Ashesh; He is suggesting not to use
Function keys as shortcuts.

And regarding configurable key options, I suspect It is going to be time
consuming task, please let me know if you want me to start working it. Or
can we keep current shortcuts from my last patch?


On Thu, Jun 16, 2016 at 4:19 PM, Dave Page  wrote:

> Hi
>
> Hmm, I guess that's system dependent. What about Ctrl+F5? Or we bite
> the bullet and make it configurable.
>
On Thu, Jun 16, 2016 at 11:47 AM, Harshal Dhumal
>  wrote:
> > Hi Dave,
> >
> > Function keys won't work properly with browser as they already have
> > predefined bindings.
> >
> > e.g.
> >
> > F5 for refresh (standard)
> > F7 for Caret Browsing in firefox
> >
> >
> > --
> > Harshal Dhumal
> > Software Engineer
> >
> > EnterpriseDB India: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal
> >  wrote:
> >>
> >> Hi Dave,
> >>
> >> Ok, I'll change shortcut keys
> >>
> >> New shortcuts would be:
> >>
> >> Execute  -->   F5
> >> Explain  -->F7
> >> Explain analyze  --> Shift+F7
> >>
> >>
> >>
> >> --
> >> Harshal Dhumal
> >> Software Engineer
> >>
> >> EnterpriseDB India: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >>
> >> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:
> >>>
> >>> Hi,
> >>>
> >>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
> >>> significantly less convenient than F5.
> >>>
> >>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
> >>>  wrote:
> >>> > Hi,
> >>> >
> >>> > PAF patch for issue RM1336
> >>> >
> >>> > Changes: Added keyboard shortcuts (static/non configurable) to some
> >>> > query
> >>> > tool operations.
> >>> >
> >>> > Execute  -->   Ctrl + Shift + E
> >>> > Explain  -->Ctrl + Shift + X
> >>> > Explain analyze  -->   Ctrl + Shift + A
> >>> >
> >>> > Note: Keyboard shortcuts do not work if focus is set on any disabled
> >>> > button
> >>> > inside query tool or out side the query tool.
> >>> >
> >>> >
> >>> > --
> >>> > Harshal Dhumal
> >>> > Software Engineer
> >>> >
> >>> > EnterpriseDB India: 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
> >>
> >>
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 12:04 PM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi  .com> wrote:
>
>>
>>
>> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:
>>
>>> Thanks, patch applied.
>>>
>>> However, whilst I was testing, I saw just how slow the tool is:
>>>
>>> SELECT * FROM pg_attribute
>>>
>>> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
>>> 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
>>> seconds, then the whole UI freezes. I then have to wait a further 3 minutes
>>> and 46 seconds() for the operation to complete. Once loaded, scrolling
>>> is very sluggish.
>>>
>>> Please make this your top priority - and if you have incremental
>>> improvements, send them as you have them.
>>>
>>
>>Sure.
>>
>
>   Below is my initial finding while running "SELECT * FROM
> pg_attribute" on PEM database, returns 8498 rows:
>
>- Fetching data from the server side took consistent time and it took
>3-4 secs.
>- Create/Render Backgrid without pagination : *1 minute*
>- Create/Render Backgrid with pagination (50 items per page):  *469ms*
>- Create/Render Backgrid with pagination (500 items per page): *3 secs*
>- Create/Render Backgrid with pagination (1000 items per page): *6
>secs*
>- Create/Render Backgrid with pagination (3000 items per page):
>*22 secs*
>- Create/Render Backgrid with pagination (5000 items per page): *36
>secs*
>
>
OK, so I guess diving into Backgrid is the next step. Are there any
profiling tools that could be used?


>
>-
>
>
>>> On Wed, Jun 15, 2016 at 4:50 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi

 Please ignore the last patch. Attached is the latest patch. Please
 review it.

 On Wed, Jun 15, 2016 at 9:10 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi
>
> On Wed, Jun 15, 2016 at 5:54 PM, Dave Page  wrote:
>
>>
>>
>> On Wed, Jun 15, 2016 at 1:16 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> On Wed, Jun 15, 2016 at 5:44 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>


 On Wed, Jun 15, 2016 at 5:25 PM, Dave Page 
 wrote:

> Hi
>
> On Wed, Jun 15, 2016 at 11:27 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi
>>
>> I have fixed RM #1356 "Query tool enhancement". I have added the
>> logic to preferences which checks the min/max value before setting 
>> it. If
>> value given by user is less than min value then set it to min value 
>> and if
>> value is greater then max value then set it to max value.
>>
>> For "items_per_page" minimum value is 1. Attached is the patch
>> file. Please review it.
>>
>
> That doesn't do what I asked for though. A value of zero should be
> acceptable (I did say <= 0, but = 0 is probably better), and mean 
> 'disable
> paging' (i.e. display unlimited rows, and completely hide the paging
> controls). From the ticket:
>
> 1) If "Items per page in grid" <= 0, then never page results. Add
> a note to that effect on the Preferences pane, and make zero the 
> default
> value.
>
> The patch does appear to implement:
>

 Backbone's Pageble Collection don't allow Zero value. Below is
 the check present in "backbone.paginator.js" file:

 if (pageSize < 1) {
   throw new RangeError("`pageSize` must be >= 1");
 }

>>> We can avoid using the Pageable Collection in our code, when
>>> pageSize is <= 0 to fix the issue.
>>>
>>
>> Exactly. The entire point of the change is to default to not paging
>> at all.
>>
>> BTW, this may be helpful (also missed from the original patch):
>>
>> help_str=gettext('The number of rows to display per page in the
>> results grid. A value of 0 will disable paging.'),
>>
>
>Fixed above as per suggestion. Attached is the modified patch file.
> Please review it.
>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91
> 976-788-8246*
>



 --
 *Akshay Joshi*
 *Principal Software Engineer *



 *Phone: +91 20-3058-9517 

Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Akshay Joshi
Hi Dave

On Thu, Jun 16, 2016 at 2:42 PM, Akshay Joshi  wrote:

>
>
> On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:
>
>> Thanks, patch applied.
>>
>> However, whilst I was testing, I saw just how slow the tool is:
>>
>> SELECT * FROM pg_attribute
>>
>> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at
>> 676ms on my laptop. In pgAdmin 4, the busy spinner runs for approx 5
>> seconds, then the whole UI freezes. I then have to wait a further 3 minutes
>> and 46 seconds() for the operation to complete. Once loaded, scrolling
>> is very sluggish.
>>
>> Please make this your top priority - and if you have incremental
>> improvements, send them as you have them.
>>
>
>Sure.
>

  Below is my initial finding while running "SELECT * FROM
pg_attribute" on PEM database, returns 8498 rows:

   - Fetching data from the server side took consistent time and it took
   3-4 secs.
   - Create/Render Backgrid without pagination : *1 minute*
   - Create/Render Backgrid with pagination (50 items per page):  *469ms*
   - Create/Render Backgrid with pagination (500 items per page): *3 secs*
   - Create/Render Backgrid with pagination (1000 items per page): *6 secs*
   - Create/Render Backgrid with pagination (3000 items per page): *22 secs*
   - Create/Render Backgrid with pagination (5000 items per page): *36 secs*


>> On Wed, Jun 15, 2016 at 4:50 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> Please ignore the last patch. Attached is the latest patch. Please
>>> review it.
>>>
>>> On Wed, Jun 15, 2016 at 9:10 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi

 On Wed, Jun 15, 2016 at 5:54 PM, Dave Page  wrote:

>
>
> On Wed, Jun 15, 2016 at 1:16 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Wed, Jun 15, 2016 at 5:44 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 5:25 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Wed, Jun 15, 2016 at 11:27 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi
>
> I have fixed RM #1356 "Query tool enhancement". I have added the
> logic to preferences which checks the min/max value before setting 
> it. If
> value given by user is less than min value then set it to min value 
> and if
> value is greater then max value then set it to max value.
>
> For "items_per_page" minimum value is 1. Attached is the patch
> file. Please review it.
>

 That doesn't do what I asked for though. A value of zero should be
 acceptable (I did say <= 0, but = 0 is probably better), and mean 
 'disable
 paging' (i.e. display unlimited rows, and completely hide the paging
 controls). From the ticket:

 1) If "Items per page in grid" <= 0, then never page results. Add a
 note to that effect on the Preferences pane, and make zero the default
 value.

 The patch does appear to implement:

>>>
>>> Backbone's Pageble Collection don't allow Zero value. Below is
>>> the check present in "backbone.paginator.js" file:
>>>
>>> if (pageSize < 1) {
>>>   throw new RangeError("`pageSize` must be >= 1");
>>> }
>>>
>> We can avoid using the Pageable Collection in our code, when pageSize
>> is <= 0 to fix the issue.
>>
>
> Exactly. The entire point of the change is to default to not paging at
> all.
>
> BTW, this may be helpful (also missed from the original patch):
>
> help_str=gettext('The number of rows to display per page in the
> results grid. A value of 0 will disable paging.'),
>

Fixed above as per suggestion. Attached is the modified patch file.
 Please review it.

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



 --
 *Akshay Joshi*
 *Principal Software Engineer *



 *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: 

Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Dave Page
Hi

Hmm, I guess that's system dependent. What about Ctrl+F5? Or we bite
the bullet and make it configurable.

On Thu, Jun 16, 2016 at 11:47 AM, Harshal Dhumal
 wrote:
> Hi Dave,
>
> Function keys won't work properly with browser as they already have
> predefined bindings.
>
> e.g.
>
> F5 for refresh (standard)
> F7 for Caret Browsing in firefox
>
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal
>  wrote:
>>
>> Hi Dave,
>>
>> Ok, I'll change shortcut keys
>>
>> New shortcuts would be:
>>
>> Execute  -->   F5
>> Explain  -->F7
>> Explain analyze  --> Shift+F7
>>
>>
>>
>> --
>> Harshal Dhumal
>> Software Engineer
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:
>>>
>>> Hi,
>>>
>>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
>>> significantly less convenient than F5.
>>>
>>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
>>>  wrote:
>>> > Hi,
>>> >
>>> > PAF patch for issue RM1336
>>> >
>>> > Changes: Added keyboard shortcuts (static/non configurable) to some
>>> > query
>>> > tool operations.
>>> >
>>> > Execute  -->   Ctrl + Shift + E
>>> > Explain  -->Ctrl + Shift + X
>>> > Explain analyze  -->   Ctrl + Shift + A
>>> >
>>> > Note: Keyboard shortcuts do not work if focus is set on any disabled
>>> > button
>>> > inside query tool or out side the query tool.
>>> >
>>> >
>>> > --
>>> > Harshal Dhumal
>>> > Software Engineer
>>> >
>>> > EnterpriseDB India: 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
>>
>>
>



-- 
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] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Harshal Dhumal
Hi Dave,

Function keys won't work properly with browser as they already have
predefined bindings.

e.g.

F5 for refresh (standard)
F7 for Caret Browsing in firefox


-- 
*Harshal Dhumal*
*Software Engineer*

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

On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Dave,
>
> Ok, I'll change shortcut keys
>
> New shortcuts would be:
>
> Execute  -->   F5
> Explain  -->F7
> Explain analyze  --> Shift+F7
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:
>
>> Hi,
>>
>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
>> significantly less convenient than F5.
>>
>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
>>  wrote:
>> > Hi,
>> >
>> > PAF patch for issue RM1336
>> >
>> > Changes: Added keyboard shortcuts (static/non configurable) to some
>> query
>> > tool operations.
>> >
>> > Execute  -->   Ctrl + Shift + E
>> > Explain  -->Ctrl + Shift + X
>> > Explain analyze  -->   Ctrl + Shift + A
>> >
>> > Note: Keyboard shortcuts do not work if focus is set on any disabled
>> button
>> > inside query tool or out side the query tool.
>> >
>> >
>> > --
>> > Harshal Dhumal
>> > Software Engineer
>> >
>> > EnterpriseDB India: 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
>>
>
>


Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Dave Page
Thanks!

On Thu, Jun 16, 2016 at 11:40 AM, Harshal Dhumal
 wrote:
> Hi Dave,
>
> Ok, I'll change shortcut keys
>
> New shortcuts would be:
>
> Execute  -->   F5
> Explain  -->F7
> Explain analyze  --> Shift+F7
>
>
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:
>>
>> Hi,
>>
>> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
>> significantly less convenient than F5.
>>
>> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
>>  wrote:
>> > Hi,
>> >
>> > PAF patch for issue RM1336
>> >
>> > Changes: Added keyboard shortcuts (static/non configurable) to some
>> > query
>> > tool operations.
>> >
>> > Execute  -->   Ctrl + Shift + E
>> > Explain  -->Ctrl + Shift + X
>> > Explain analyze  -->   Ctrl + Shift + A
>> >
>> > Note: Keyboard shortcuts do not work if focus is set on any disabled
>> > button
>> > inside query tool or out side the query tool.
>> >
>> >
>> > --
>> > Harshal Dhumal
>> > Software Engineer
>> >
>> > EnterpriseDB India: 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
>
>



-- 
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] Patches

2016-06-16 Thread Sandeep Thakkar
On Thu, Jun 16, 2016 at 3:19 PM, Dave Page  wrote:

> On Thu, Jun 16, 2016 at 8:51 AM, Sandeep Thakkar
>  wrote:
> > Hi,
> >
> > I created virtual environment and tried building pgadmin on my Mac with
> > Python 3.3 and QT 5.5. I observed that in venv, the python3-config is
> copied
> > as python-config. Therefore, it's required to change pgAdmin4.pro to
> handle
> > this. With the existing .pro, it does not find the python3-config and
> > assumes it is Python2 and throws the following build error:
> > --
> > Server.cpp:36:5: error: no matching function for call to
> 'Py_SetProgramName'
> > Py_SetProgramName(PGA_APP_NAME.toUtf8().data());
> >
> >
> /mnt/hgfs/pginstaller.pune/server/source/pgadmin.osx/mac-build/venv/include/python3.3m/pythonrun.h:25:18:
> > note: candidate function not viable: no known conversion from 'char *' to
> > 'wchar_t *' for 1st
> >
> >   argument
> >
> > PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
> > --
> >
> > I have attached the patch (pgadminpro.patch) to fix this.
>
> Configuration and build fails for me with this:
>
> yeah, the 'contains' function is trying to match the whole string.
Replacing that line in the patch with "contains( LIBS, -lpython2.* )"
should work fine.


> Project MESSAGE: Building for QT5+...
> Project MESSAGE: Configure pgAdmin4 to run in debug mode...
> Project MESSAGE: Building for Linux/Mac...
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
> Project MESSAGE: Python3 detected.
>
> (pgadmin4)piranha:pgAdmin4 dpage$ which python-config
> /usr/bin/python-config
> (pgadmin4)piranha:pgAdmin4 dpage$ which python3-config
> (pgadmin4)piranha:pgAdmin4 dpage$ locate python3-config
> (pgadmin4)piranha:pgAdmin4 dpage$ python-config --libs
> -lpython2.7 -ldl -framework CoreFoundation
>
> Though - I also get some funky output without the patch (but, the
> build succeeds):
>
> Project MESSAGE: Building for QT5+...
> Project MESSAGE: Configure pgAdmin4 to run in debug mode...
> Project MESSAGE: Building for Linux/Mac...
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
> /bin/sh: python3-config: command not found
>
>
> > Another thing i observed is that in venv, the encodings directory in sym
> > linked to the actual one on the system and hence the build fails with the
> > following error:
> > --
> > Could not find platform independent libraries 
> > Could not find platform dependent libraries 
> > Consider setting $PYTHONHOME to [:]
> > Fatal Python error: Py_Initialize: unable to load the file system codec
> > ImportError: No module named 'encodings'
> > --
> >
> > I have attached the patch (pgadmin-macbuild.patch) to make sure the
> > virtualenv for macbuild copies the required files instead of linking. In
> the
> > same patch, I also modified the build script to not rename the actual
> > directory of python in venv (as python libs may refer the actual
> directory)
> > and instead create a sym link. There might be other way to fix this, but
> I
> > found this to be easy. :)
>
> This second patch breaks builds for me:
>
> This is strange because I just added a new option "--always-copy" to
virtualenv. What is your path to virtualenv? Could you please try running
'virtualenv -v  --always-copy -p
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
/tmp/venv'


> PYTHON_HOME not set. Setting it to default
> QTDIR not set. Setting it to default
> PGDIR not set. Setting it to default
> Cleaning up the old environment and app bundle
> Running virtualenv with interpreter
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
> Traceback (most recent call last):
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 2311, in
> 
> main()
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 703, in main
> symlink=options.symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 916, in
> create_environment
> site_packages=site_packages, clear=clear, symlink=symlink))
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line ,
> in install_python
> copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 352, in
> copyfile
> copyfileordir(src, dest, symlink)
>   File "/Library/Python/2.7/site-packages/virtualenv.py", line 324, in
> copyfileordir
> shutil.copytree(src, dest, symlink)
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
> line 208, in copytree
> raise Error, errors
> shutil.Error:
> [('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c',
> '/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c',
> "[Errno 1] Operation not permitted:
> '/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c'"),
>

Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Harshal Dhumal
Hi Dave,

Ok, I'll change shortcut keys

New shortcuts would be:

Execute  -->   F5
Explain  -->F7
Explain analyze  --> Shift+F7



-- 
*Harshal Dhumal*
*Software Engineer*

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

On Thu, Jun 16, 2016 at 4:03 PM, Dave Page  wrote:

> Hi,
>
> Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
> significantly less convenient than F5.
>
> On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
>  wrote:
> > Hi,
> >
> > PAF patch for issue RM1336
> >
> > Changes: Added keyboard shortcuts (static/non configurable) to some query
> > tool operations.
> >
> > Execute  -->   Ctrl + Shift + E
> > Explain  -->Ctrl + Shift + X
> > Explain analyze  -->   Ctrl + Shift + A
> >
> > Note: Keyboard shortcuts do not work if focus is set on any disabled
> button
> > inside query tool or out side the query tool.
> >
> >
> > --
> > Harshal Dhumal
> > Software Engineer
> >
> > EnterpriseDB India: 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
>


Re: [pgadmin-hackers] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Dave Page
Hi,

Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
significantly less convenient than F5.

On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
 wrote:
> Hi,
>
> PAF patch for issue RM1336
>
> Changes: Added keyboard shortcuts (static/non configurable) to some query
> tool operations.
>
> Execute  -->   Ctrl + Shift + E
> Explain  -->Ctrl + Shift + X
> Explain analyze  -->   Ctrl + Shift + A
>
> Note: Keyboard shortcuts do not work if focus is set on any disabled button
> inside query tool or out side the query tool.
>
>
> --
> Harshal Dhumal
> Software Engineer
>
> EnterpriseDB India: 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 the runtime from compiling bytecode to avoid

2016-06-16 Thread Dave Page
Prevent the runtime from compiling bytecode to avoid permissions issues.

Branch
--
master

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

Modified Files
--
runtime/Server.cpp | 1 +
1 file changed, 1 insertion(+)


-- 
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] Fix for issue RM1336 [pgadmin4]

2016-06-16 Thread Harshal Dhumal
Hi,

PAF patch for issue RM1336

Changes: Added keyboard shortcuts (static/non configurable) to some query
tool operations.

Execute  -->   Ctrl + Shift + E
Explain  -->Ctrl + Shift + X
Explain analyze  -->   Ctrl + Shift + A

Note: Keyboard shortcuts do not work if focus is set on any disabled button
inside query tool or out side the query tool.


-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
index 43510cd..bde3757 100644
--- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html
+++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
@@ -61,7 +61,7 @@ body {
 
   
   
-
+
   
 
 
@@ -70,12 +70,12 @@ body {
 
   
 
-  {{ _('Explain') }}
+  {{ _('Explain (Ctrl+Shift+X)') }}
 
   
   
 
-{{ _('Explain analyze') }}
+{{ _('Explain analyze (Ctrl+Shift+A)') }}
 
   
   
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 60c4ee4..9c9514f 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -175,7 +175,8 @@ define(
 "click #btn-explain-costs": "on_explain_costs",
 "click #btn-explain-buffers": "on_explain_buffers",
 "click #btn-explain-timing": "on_explain_timing",
-"change .limit": "on_limit_change"
+"change .limit": "on_limit_change",
+"keyup": "keyAction"
   },
 
   // This function is used to render the template.
@@ -1010,6 +1011,25 @@ define(
 self,
 self.handler
 );
+  },
+
+  // Callback for keyboard event
+  keyAction: function(ev) {
+if(ev.ctrlKey && ev.shiftKey) {
+  if(ev.keyCode == 69) {
+// char e/E
+// Execute query.
+this.on_flash(ev);
+  } else if(ev.keyCode == 88){
+// char x/X
+// Explain query.
+this.on_explain(ev);
+  } else if(ev.keyCode == 65) {
+// char a/A
+// Explain analyze query.
+this.on_explain_analyze(ev);
+  }
+}
   }
 });
 

-- 
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 display of NaN and Bytea data. Fixes #1350. Fixes

2016-06-16 Thread Dave Page
Fix display of NaN and Bytea data. Fixes #1350. Fixes #1309

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 17 +
1 file changed, 17 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: To fix error displaying bytea field (pgAdmin4)

2016-06-16 Thread Dave Page
Thanks - applied.

On Thu, Jun 16, 2016 at 10:01 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the issue where query tool was not able to show/handle
> bytea field.
>
> This patch will two issues,
>
> RM#1350  (To handle bytea)
> RM#1309  (To handle NaN)
>
>
> --
> 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] Patches

2016-06-16 Thread Dave Page
On Thu, Jun 16, 2016 at 8:51 AM, Sandeep Thakkar
 wrote:
> Hi,
>
> I created virtual environment and tried building pgadmin on my Mac with
> Python 3.3 and QT 5.5. I observed that in venv, the python3-config is copied
> as python-config. Therefore, it's required to change pgAdmin4.pro to handle
> this. With the existing .pro, it does not find the python3-config and
> assumes it is Python2 and throws the following build error:
> --
> Server.cpp:36:5: error: no matching function for call to 'Py_SetProgramName'
> Py_SetProgramName(PGA_APP_NAME.toUtf8().data());
>
> /mnt/hgfs/pginstaller.pune/server/source/pgadmin.osx/mac-build/venv/include/python3.3m/pythonrun.h:25:18:
> note: candidate function not viable: no known conversion from 'char *' to
> 'wchar_t *' for 1st
>
>   argument
>
> PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
> --
>
> I have attached the patch (pgadminpro.patch) to fix this.

Configuration and build fails for me with this:

Project MESSAGE: Building for QT5+...
Project MESSAGE: Configure pgAdmin4 to run in debug mode...
Project MESSAGE: Building for Linux/Mac...
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found
Project MESSAGE: Python3 detected.

(pgadmin4)piranha:pgAdmin4 dpage$ which python-config
/usr/bin/python-config
(pgadmin4)piranha:pgAdmin4 dpage$ which python3-config
(pgadmin4)piranha:pgAdmin4 dpage$ locate python3-config
(pgadmin4)piranha:pgAdmin4 dpage$ python-config --libs
-lpython2.7 -ldl -framework CoreFoundation

Though - I also get some funky output without the patch (but, the
build succeeds):

Project MESSAGE: Building for QT5+...
Project MESSAGE: Configure pgAdmin4 to run in debug mode...
Project MESSAGE: Building for Linux/Mac...
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found
/bin/sh: python3-config: command not found


> Another thing i observed is that in venv, the encodings directory in sym
> linked to the actual one on the system and hence the build fails with the
> following error:
> --
> Could not find platform independent libraries 
> Could not find platform dependent libraries 
> Consider setting $PYTHONHOME to [:]
> Fatal Python error: Py_Initialize: unable to load the file system codec
> ImportError: No module named 'encodings'
> --
>
> I have attached the patch (pgadmin-macbuild.patch) to make sure the
> virtualenv for macbuild copies the required files instead of linking. In the
> same patch, I also modified the build script to not rename the actual
> directory of python in venv (as python libs may refer the actual directory)
> and instead create a sym link. There might be other way to fix this, but I
> found this to be easy. :)

This second patch breaks builds for me:

PYTHON_HOME not set. Setting it to default
QTDIR not set. Setting it to default
PGDIR not set. Setting it to default
Cleaning up the old environment and app bundle
Running virtualenv with interpreter
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 2311, in 
main()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 703, in main
symlink=options.symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 916, in
create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
  File "/Library/Python/2.7/site-packages/virtualenv.py", line ,
in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 352, in copyfile
copyfileordir(src, dest, symlink)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 324, in
copyfileordir
shutil.copytree(src, dest, symlink)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 208, in copytree
raise Error, errors
shutil.Error: 
[('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c',
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c',
"[Errno 1] Operation not permitted:
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c.in',
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c.in',
"[Errno 1] Operation not permitted:
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/config.c.in'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/install-sh',
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/install-sh',
"[Errno 1] Operation not permitted:
'/Users/dpage/git/pgadmin4/mac-build/venv/lib/python2.7/config/install-sh'"),
('/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.a',

Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Akshay Joshi
On Thu, Jun 16, 2016 at 2:35 PM, Dave Page  wrote:

> Thanks, patch applied.
>
> However, whilst I was testing, I saw just how slow the tool is:
>
> SELECT * FROM pg_attribute
>
> In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at 676ms
> on my laptop. In pgAdmin 4, the busy spinner runs for approx 5 seconds,
> then the whole UI freezes. I then have to wait a further 3 minutes and 46
> seconds() for the operation to complete. Once loaded, scrolling is very
> sluggish.
>
> Please make this your top priority - and if you have incremental
> improvements, send them as you have them.
>

   Sure.

>
> On Wed, Jun 15, 2016 at 4:50 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi
>>
>> Please ignore the last patch. Attached is the latest patch. Please review
>> it.
>>
>> On Wed, Jun 15, 2016 at 9:10 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> On Wed, Jun 15, 2016 at 5:54 PM, Dave Page  wrote:
>>>


 On Wed, Jun 15, 2016 at 1:16 PM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

> On Wed, Jun 15, 2016 at 5:44 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Jun 15, 2016 at 5:25 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Wed, Jun 15, 2016 at 11:27 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi

 I have fixed RM #1356 "Query tool enhancement". I have added the
 logic to preferences which checks the min/max value before setting it. 
 If
 value given by user is less than min value then set it to min value 
 and if
 value is greater then max value then set it to max value.

 For "items_per_page" minimum value is 1. Attached is the patch
 file. Please review it.

>>>
>>> That doesn't do what I asked for though. A value of zero should be
>>> acceptable (I did say <= 0, but = 0 is probably better), and mean 
>>> 'disable
>>> paging' (i.e. display unlimited rows, and completely hide the paging
>>> controls). From the ticket:
>>>
>>> 1) If "Items per page in grid" <= 0, then never page results. Add a
>>> note to that effect on the Preferences pane, and make zero the default
>>> value.
>>>
>>> The patch does appear to implement:
>>>
>>
>> Backbone's Pageble Collection don't allow Zero value. Below is
>> the check present in "backbone.paginator.js" file:
>>
>> if (pageSize < 1) {
>>   throw new RangeError("`pageSize` must be >= 1");
>> }
>>
> We can avoid using the Pageable Collection in our code, when pageSize
> is <= 0 to fix the issue.
>

 Exactly. The entire point of the change is to default to not paging at
 all.

 BTW, this may be helpful (also missed from the original patch):

 help_str=gettext('The number of rows to display per page in the results
 grid. A value of 0 will disable paging.'),

>>>
>>>Fixed above as per suggestion. Attached is the modified patch file.
>>> Please review it.
>>>

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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Re: [pgadmin-hackers] Fixed RM #1356

2016-06-16 Thread Dave Page
Thanks, patch applied.

However, whilst I was testing, I saw just how slow the tool is:

SELECT * FROM pg_attribute

In a PEM database, returns 8150 rows. In pgAdmin 3, this is timed at 676ms
on my laptop. In pgAdmin 4, the busy spinner runs for approx 5 seconds,
then the whole UI freezes. I then have to wait a further 3 minutes and 46
seconds() for the operation to complete. Once loaded, scrolling is very
sluggish.

Please make this your top priority - and if you have incremental
improvements, send them as you have them.

On Wed, Jun 15, 2016 at 4:50 PM, Akshay Joshi  wrote:

> Hi
>
> Please ignore the last patch. Attached is the latest patch. Please review
> it.
>
> On Wed, Jun 15, 2016 at 9:10 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi
>>
>> On Wed, Jun 15, 2016 at 5:54 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 1:16 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 On Wed, Jun 15, 2016 at 5:44 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

>
>
> On Wed, Jun 15, 2016 at 5:25 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Jun 15, 2016 at 11:27 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> I have fixed RM #1356 "Query tool enhancement". I have added the
>>> logic to preferences which checks the min/max value before setting it. 
>>> If
>>> value given by user is less than min value then set it to min value and 
>>> if
>>> value is greater then max value then set it to max value.
>>>
>>> For "items_per_page" minimum value is 1. Attached is the patch file.
>>> Please review it.
>>>
>>
>> That doesn't do what I asked for though. A value of zero should be
>> acceptable (I did say <= 0, but = 0 is probably better), and mean 
>> 'disable
>> paging' (i.e. display unlimited rows, and completely hide the paging
>> controls). From the ticket:
>>
>> 1) If "Items per page in grid" <= 0, then never page results. Add a
>> note to that effect on the Preferences pane, and make zero the default
>> value.
>>
>> The patch does appear to implement:
>>
>
> Backbone's Pageble Collection don't allow Zero value. Below is the
> check present in "backbone.paginator.js" file:
>
> if (pageSize < 1) {
>   throw new RangeError("`pageSize` must be >= 1");
> }
>
 We can avoid using the Pageable Collection in our code, when pageSize
 is <= 0 to fix the issue.

>>>
>>> Exactly. The entire point of the change is to default to not paging at
>>> all.
>>>
>>> BTW, this may be helpful (also missed from the original patch):
>>>
>>> help_str=gettext('The number of rows to display per page in the results
>>> grid. A value of 0 will disable paging.'),
>>>
>>
>>Fixed above as per suggestion. Attached is the modified patch file.
>> Please review it.
>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>



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

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


[pgadmin-hackers] PATCH: To fix error displaying bytea field (pgAdmin4)

2016-06-16 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue where query tool was not able to show/handle
bytea field.

This patch will two issues,

   - RM#1350  (To handle bytea)
   - RM#1309  (To handle NaN)


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM_1350_1309.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] pgAdmin 4 commit: Allow a value of 0 rows per page to mean "no paging".

2016-06-16 Thread Dave Page
Allow a value of 0 rows per page to mean "no paging". Allow rows to be added on 
any page.

Fixes #1356

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f9393aee4488c5f35eece0d2884ccf90ff13d7bf
Author: Akshay Joshi 

Modified Files
--
web/pgadmin/tools/sqleditor/__init__.py|   5 +-
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 218 +++--
web/pgadmin/utils/preferences.py   |   4 +
3 files changed, 171 insertions(+), 56 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] Patches

2016-06-16 Thread Dave Page
Hi

On Thu, Jun 16, 2016 at 8:51 AM, Sandeep Thakkar
 wrote:
> Hi,
>
> I created virtual environment and tried building pgadmin on my Mac with
> Python 3.3 and QT 5.5. I observed that in venv, the python3-config is copied
> as python-config. Therefore, it's required to change pgAdmin4.pro to handle
> this. With the existing .pro, it does not find the python3-config and
> assumes it is Python2 and throws the following build error:

My Mac is a fully patched El Capitan installation, and has Python
2.7.10. Why do you need Python 3 support for this build?

-- 
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: Add files missed from previous commit.

2016-06-16 Thread Dave Page
Add files missed from previous commit.

Branch
--
master

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

Modified Files
--
docs/en_US/images/add_pgadmin_user.png  | Bin 0 -> 38475 bytes
docs/en_US/images/move_objects_general.png  | Bin 0 -> 47788 bytes
docs/en_US/images/move_objects_sql.png  | Bin 0 -> 106312 bytes
docs/en_US/images/pgadmin_login.png | Bin 0 -> 44669 bytes
docs/en_US/images/pgadmin_login_recover.png | Bin 0 -> 63872 bytes
docs/en_US/images/pgadmin_user.png  | Bin 0 -> 39775 bytes
docs/en_US/move_objects.rst |  42 
docs/en_US/pgadmin_login.rst|  28 +++
docs/en_US/pgadmin_user.rst |  42 
9 files changed, 112 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] Patches

2016-06-16 Thread Sandeep Thakkar
Hi,

I created virtual environment and tried building pgadmin on my Mac with
Python 3.3 and QT 5.5. I observed that in venv, the python3-config is
copied as python-config. Therefore, it's required to change pgAdmin4.pro to
handle this. With the existing .pro, it does not find the python3-config
and assumes it is Python2 and throws the following build error:
--






*Server.cpp:36:5: error: no matching function for call to
'Py_SetProgramName'
Py_SetProgramName(PGA_APP_NAME.toUtf8().data());/mnt/hgfs/pginstaller.pune/server/source/pgadmin.osx/mac-build/venv/include/python3.3m/pythonrun.h:25:18:
note: candidate function not viable: no known conversion from 'char *' to
'wchar_t *' for 1st  argumentPyAPI_FUNC(void) Py_SetProgramName(wchar_t
*);*
--

I have attached the patch (pgadminpro.patch) to fix this.

Another thing i observed is that in venv, the encodings directory in sym
linked to the actual one on the system and hence the build fails with the
following error:
--




*Could not find platform independent libraries Could not find
platform dependent libraries Consider setting $PYTHONHOME to
[:]Fatal Python error: Py_Initialize: unable to load
the file system codecImportError: No module named 'encodings'*
--

I have attached the patch (pgadmin-macbuild.patch) to make sure the
virtualenv for macbuild copies the required files instead of linking. In
the same patch, I also modified the build script to not rename the actual
directory of python in venv (as python libs may refer the actual directory)
and instead create a sym link. There might be other way to fix this, but I
found this to be easy. :)

Thanks!


--
Sandeep Thakkar


pgadmin-macbuild.patch
Description: Binary data


pgadminpro.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