Re: [pgadmin-support] Pgadmin 4 view and sort table

2016-10-24 Thread Dave Page
On Mon, Oct 24, 2016 at 5:37 AM, Josh Berkus  wrote:
> Russell,
>
> I'm responding as a fellow user.
>
>
>>> Perhaps I am jumping the gun here, as the software is recently
>>> released, but I am having trouble figuring out some basic operations
>>> that I could do using PGAdmin 3.
>>>
>>> 1.  Open a table in its own window.  In PGAdmin 3, opening a table
>>> opened its own window that was independent of the main system tree.
>>> This allowed for arranging multiple tables across screens.  Now, all
>>> windows may float, but they are constrained within the application
>>> window.  Is this by design, or am I missing something?  It makes it
>>> infinitely more difficult to use when everything is constrained to a
>>> single window.
>
> This is definitely a limitation, I expect largely due to the convertion
> to a browser-based primary application version.  Note that I'm using the
> webserver, so I don't know if there's a way around this in the desktop app.

Right - because it's a web app, it's constrained to the browser (which
includes the desktop runtime). Some panel types are largely
self-contained though (e.g. the query tool and debugger), so we have a
TODO to allow them to be opened in new browser windows or tabs - this
is noted in the feature request here:
https://redmine.postgresql.org/issues/1344

>>> 2.  When you view the data in a table, it does not seem possible to
>>> sort the table.  Opening a table to view all records creates a
>>> "Query-1" tab, which has a basic Select * by query, with order by the
>>> primary key.  This is all greyed out and unable to be modified.  How
>>> do you resort a table?
>
> At this point?  Add "ORDER BY column" to the query.

You can't currently edit the query when in View Data mode (because we
don't yet have enough smarts to determine whether the output of an
arbitrary query is updatable or not). It looks like we lost the
ability to sort though, I suspect when we moved to using SlickGrid
instead of BackGrid. Currently, we always sort by the primary key I
believe, but you do also have filtering options that may help find
what you're looking for.

Missing feature logged here: https://redmine.postgresql.org/issues/1894

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

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


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


Re: [pgadmin-support] pgAdmin4 Server does not create SQLite tables

2016-10-24 Thread Dave Page
On Mon, Oct 24, 2016 at 5:30 AM, Josh Berkus  wrote:
> On 10/11/2016 01:47 PM, Dave Page wrote:
>>
>>
>> On Tuesday, October 11, 2016, Josh Berkus > > wrote:
>
>> Ah, so I can drop a path into config_local?
>>
>>
>> Yes, per the example I sent yesterday. config_local.py (and
>> config_distro.py) are sourced by config.py. config_distro is read first,
>> and can be used by packagers to override distro-specific options, and
>> then config_local is read to allow users to do further customisation.
>
> So, currently there is no "DATA_DIR" parameter in config_local,
> commented out or otherwise, and the parameter in config.py references a
> bit of python code.  If users are expected to do this on their own,
> you'll need at least a commented-out example in config_local.py.

We don't even provide config_local.py, except in the original desktop
packages - that was intentional in 1.0 as it was done to force the
user to create it and set the security keys.

> Presumably I just set DATA_DIR to where I want the SQLite DB to go, yes?
>  Or do I set it to its parent directory?  Code in config.py doesn't make
> it clear.

DATA_DIR is used as a prefix for various other config settings, so
changing it later on won't (unfortunately) change them as well. I
would just change the config settings that ultimately use DATA_DIR in
config.py, but ignore DATA_DIR itself. e.g.

LOG_FILE = '/var/log/pgadmin4/pgadmin4.log'
SQLITE_PATH = '/var/lib/pgadmin4/pgadmin4.db'
SESSION_DB_PATH = '/var/lib/pgadmin4/sessions'
STORAGE_DIR = '/var/lib/pgadmin4/storage'

I'll do some work on the docs later today to make that clearer.

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

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


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


Re: [pgadmin-support] Issues with query window

2016-10-24 Thread Dave Page
On Mon, Oct 24, 2016 at 7:13 AM, Murtuza Zabuawala
 wrote:
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Oct 24, 2016 at 10:12 AM, Josh Berkus  wrote:
>>
>> Dave, all:
>>
>>
>> 1. The column headers in the query result do not line up with the
>> columns of data.  See attached screenshot.
>>
> This known issue in Firefox & will be taken care in future release,
> meanwhile could you use different browser like chrome?
>>
>> 2. EXPLAIN does not display at all; the contents of the EXPLAIN tab are
>> always empty.
>>
> I am not able to re-produce the issue on my side (Refer screenshot).
> Could you provide more details on this so that we can re-produce the issue?

Yeah, I can't reproduce either. However, with larger plans it can be
the case that the top-left corner which is shown initially is
sometimes empty, if there are deeper branches of the plan further
down. Try zooming out or scrolling down or right.

There is a feature request and some initial work has been done to add
a "minimap" control to the panel to make navigation easier:
https://redmine.postgresql.org/issues/1763

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

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


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


Re: [pgadmin-support] PgAdmin4 Bug report - Zoomed too far out

2016-10-24 Thread Dave Page
Hi

On Thu, Oct 20, 2016 at 6:13 PM, Michael Higgins
 wrote:
> The same behavior happens with zoom set to 1.
>
> Please let me know if I can provide logs or anything helpful!

I have no idea what is causing this then, unless there's another
config file that's being read somehow (which Qt may do - check under
~/.config/)

I assume you've tried zooming back in many times until it becomes
visible again? On my keyboard that requires Cmd + Shift + .
Technically that gets documented as Cmd +  which is correct, but
shift is needed as well on some keyboards where + is above =.

>
> Thanks, Mike
>
>
> On Oct 20, 2016 12:25 PM, "Michael Higgins" 
> wrote:
>
> It WAS re-created when CLOSING PgAdmin4.
>
> However, even with Browser.Zoom set to 0, I still just have a white screen.
>
>
>
> On Thu, Oct 20, 2016 at 12:22 PM, Michael Higgins
>  wrote:
>>
>> Great!
>>
>> The value I had was "-8.4618530273".
>>
>> Changing the value didn't work.
>> Removing the plist file did not work.
>> The plist file was NOT recreated when I opened PgAdmin4.
>> The plist file was NOT recreated when I "re-installed" PgAdmin4.
>>
>> Is there any other information/logs I can provide?
>>
>> ~
>>
>>
>> On Thu, Oct 20, 2016 at 11:58 AM, Dave Page  wrote:
>>>
>>> On Thu, Oct 20, 2016 at 4:51 PM, Michael Higgins
>>>  wrote:
>>> > First, thanks for everyone who contributes to this project. It's the
>>> > only
>>> > reliable client.
>>> >
>>> > I am running PgAdmin 4 v1.0 on OSX 10.11.6.
>>> >
>>> > I accidentally zoomed "too" far out using COMMAND + "Minus"
>>> > Now, I can not see anything.
>>> >
>>> > I cannot zoom back IN with COMMAND + "Plus"
>>> >
>>> > I cannot reset the settings, even when uninstalling then reinstalling.
>>> > I
>>> > have tried HOMEBREW and the normal DMG path.
>>> >
>>> > Is this a known Bug?
>>> > Is there a workaround?
>>>
>>> No - and I can't reproduce it on my 10.12 (Sierra) machine :-/
>>>
>>> The zoom level is saved in ~/Library/Preferences/org.pgadmin.pgAdmin\
>>> 4.plist
>>>
>>> If you have XCode installed, you can edit the file (when pgAdmin isn't
>>> running) - set the Browser.Zoom property to 1. If you don't, you
>>> should just be able to move the file out of the way and then start
>>> pgAdmin to return to the default settings for the runtime.
>>>
>>> --
>>> 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-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


[pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread André Cardoso
myuser@mydebian8:~/pgadmin4-1.0/runtime$ ./pgAdmin4
Python path:  ""
Python Home:  ""
Webapp path:  "/home/myuser/pgadmin4-1.0/web/pgAdmin4.py"
Traceback (most recent call last):
  File "/home/myuser/pgadmin4-1.0/web/pgAdmin4.py", line 24, in 
from pgadmin import create_app
  File "/home/myuser/pgadmin4-1.0/web/pgadmin/__init__.py", line 17, in

from flask import Flask, abort, request, current_app
ImportError: No module named flask
"Failed to launch the application server, server thread exiting."

Already tried to set PYTHONPATH with export PYTHONPATH=/usr/bin/python or
whatever value but stills get the same message as above. "Python path" and
"Python Home" stills empty.

How can I fix this?

- Version of pgAdmin: pgAdmin4-1.0

- The configure options used: qmake CONFIG+=debug and qmake CONFIG+=release

- Operating system: Debian Jessie 8.6

- Whether you're running in server or desktop mode: Desktop

- Qt version and configure options used (if compiled from source): apt-get
install qt4-default

- The Python version and configure options used (if running in server
mode): Python 2.7.9 (default, Jun 29 2016, 13:08:31)

- Steps required to reproduce the problem
apt-get install qmake qt4-qmake python-dev qt4-qtconfig qt4-default
cd $PGADMIN4_SRC/runtime
qmake
make
./pgAdmin4

Python path:  ""
Python Home:  ""
Webapp path:  "/home/myuser/pgadmin4-1.0/web/pgAdmin4.py"
Traceback (most recent call last):
  File "/home/myuser/pgadmin4-1.0/web/pgAdmin4.py", line 24, in 
from pgadmin import create_app
  File "/home/myuser/pgadmin4-1.0/web/pgadmin/__init__.py", line 17, in

from flask import Flask, abort, request, current_app
ImportError: No module named flask
"Failed to launch the application server, server thread exiting."


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread Johann Spies
On Mon, Oct 24, 2016 at 11:03:17AM -0200, André Cardoso wrote:
> 
> from flask import Flask, abort, request, current_app
> ImportError: No module named flask
> "Failed to launch the application server, server thread exiting."

...
> 
> How can I fix this?

Try "pip-install Flask" and if necessary other Flask-related packages.

I have

$ pip list | grep Flask
Flask (0.11.1)
Flask-Babel (0.11.1)
Flask-Gravatar (0.4.2)
Flask-Login (0.3.2)
Flask-Mail (0.9.1)
Flask-Principal (0.4.0)
Flask-Security (1.7.5)
Flask-SQLAlchemy (2.1)
Flask-WTF (0.12)

but I don't know whether all if it is necessary.

Regards
Johann


-- 
Johann SpiesTelefoon: 021-808 4699
Databestuurder /  Data manager  Faks: 021-883 3691

Sentrum vir Navorsing oor Evaluasie, Wetenskap en Tegnologie
Centre for Research on Evaluation, Science and Technology 
Universiteit Stellenbosch.

The integrity and confidentiality of this email is governed by these terms / 
Hierdie terme bepaal die integriteit en vertroulikheid van hierdie epos. 
http://www.sun.ac.za/emaildisclaimer


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


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread Dave Page
On Mon, Oct 24, 2016 at 2:33 PM, Johann Spies  wrote:
> On Mon, Oct 24, 2016 at 11:03:17AM -0200, André Cardoso wrote:
>> 
>> from flask import Flask, abort, request, current_app
>> ImportError: No module named flask
>> "Failed to launch the application server, server thread exiting."
>
> ...
>>
>> How can I fix this?
>
> Try "pip-install Flask" and if necessary other Flask-related packages.
>
> I have
>
> $ pip list | grep Flask
> Flask (0.11.1)
> Flask-Babel (0.11.1)
> Flask-Gravatar (0.4.2)
> Flask-Login (0.3.2)
> Flask-Mail (0.9.1)
> Flask-Principal (0.4.0)
> Flask-Security (1.7.5)
> Flask-SQLAlchemy (2.1)
> Flask-WTF (0.12)
>
> but I don't know whether all if it is necessary.

The requirements are listed in the requirements_py*.txt files in the
top of the source tree. You should be able to do:

pip install -r requirements_py2.txt

to get everything required, assuming you're using Python 2.

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

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


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


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread Dave Page
Please keep the list CC'd.

On Mon, Oct 24, 2016 at 2:42 PM, André Cardoso  wrote:
> root@mydebian8:/home/i1854609/pgadmin4-1.0# pip install -r
> requirements_py2.txt
> Exception:
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in
> main
> status = self.run(options, args)
>   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 274,
> in run
> for req in parse_requirements(filename, finder=finder, options=options,
> session=session):
>   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in
> parse_requirements
> req = InstallRequirement.from_line(line, comes_from,
> prereleases=getattr(options, "pre", None))
>   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in from_line
> return cls(req, comes_from, url=url, prereleases=prereleases)
>   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in __init__
> req = pkg_resources.Requirement.parse(req)
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2793, in
> parse
> reqs = list(parse_requirements(s))
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in
> parse_requirements
> "version spec")
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in
> scan_list
> raise ValueError(msg, line, "at", line[p:])
> ValueError: ('Expected version spec in', "ordereddict; python_version <
> '2.7'", 'at', "; python_version < '2.7'")

I'd guess you have an old version of pip that doesn't understand the
environment marker on the very last line of the file. I would either:

- Upgrade pip

- Edit the requirements file and remove the last line if you have
Python 2.7 or remove everything from and including the ; onwards if
you have Python 2.6. Then, re-run pip install -r requirements_py2.txt.

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

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


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


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread André Cardoso
I'm using Python 2.7.9...
Made changes to the last line of the requirements_py2.txt file keeping
only ordereddict.

Got the errors below...

root@mydebian8:/home/mydebian8/pgadmin4-1.0# pip install -r
requirements_py2.txt
Downloading/unpacking Babel==1.3 (from -r requirements_py2.txt (line 1))
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Babel==1.3
(from -r requirements_py2.txt (line 1))
Cleaning up...
No distributions at all found for Babel==1.3 (from -r requirements_py2.txt
(line 1))
Storing debug log for failure in /root/.pip/pip.log

How can I set pip to use proxy?

Thank you!

2016-10-24 11:50 GMT-02:00 Dave Page :

> Please keep the list CC'd.
>
> On Mon, Oct 24, 2016 at 2:42 PM, André Cardoso 
> wrote:
> > root@mydebian8:/home/i1854609/pgadmin4-1.0# pip install -r
> > requirements_py2.txt
> > Exception:
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122,
> in
> > main
> > status = self.run(options, args)
> >   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line
> 274,
> > in run
> > for req in parse_requirements(filename, finder=finder,
> options=options,
> > session=session):
> >   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in
> > parse_requirements
> > req = InstallRequirement.from_line(line, comes_from,
> > prereleases=getattr(options, "pre", None))
> >   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in
> from_line
> > return cls(req, comes_from, url=url, prereleases=prereleases)
> >   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in
> __init__
> > req = pkg_resources.Requirement.parse(req)
> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2793,
> in
> > parse
> > reqs = list(parse_requirements(s))
> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721,
> in
> > parse_requirements
> > "version spec")
> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686,
> in
> > scan_list
> > raise ValueError(msg, line, "at", line[p:])
> > ValueError: ('Expected version spec in', "ordereddict; python_version <
> > '2.7'", 'at', "; python_version < '2.7'")
>
> I'd guess you have an old version of pip that doesn't understand the
> environment marker on the very last line of the file. I would either:
>
> - Upgrade pip
>
> - Edit the requirements file and remove the last line if you have
> Python 2.7 or remove everything from and including the ; onwards if
> you have Python 2.6. Then, re-run pip install -r requirements_py2.txt.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread Dave Page
On Mon, Oct 24, 2016 at 4:01 PM, André Cardoso  wrote:
> I'm using Python 2.7.9...
> Made changes to the last line of the requirements_py2.txt file keeping only
> ordereddict.
>
> Got the errors below...
>
> root@mydebian8:/home/mydebian8/pgadmin4-1.0# pip install -r
> requirements_py2.txt
> Downloading/unpacking Babel==1.3 (from -r requirements_py2.txt (line 1))
>   Cannot fetch index base URL https://pypi.python.org/simple/
>   Could not find any downloads that satisfy the requirement Babel==1.3 (from
> -r requirements_py2.txt (line 1))
> Cleaning up...
> No distributions at all found for Babel==1.3 (from -r requirements_py2.txt
> (line 1))
> Storing debug log for failure in /root/.pip/pip.log
>
> How can I set pip to use proxy?

I have no idea I'm afraid.

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

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


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


Re: [pgadmin-support] Issues with query window

2016-10-24 Thread Josh Berkus
On 10/23/2016 11:13 PM, Murtuza Zabuawala wrote:
> 
> 
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com 
> The Enterprise PostgreSQL Company
> 
> On Mon, Oct 24, 2016 at 10:12 AM, Josh Berkus  > wrote:
> 
> Dave, all:
> 
> 
> 1. The column headers in the query result do not line up with the
> columns of data.  See attached screenshot.
> 
> This known issue in Firefox & will be taken care in future release,
>  meanwhile could you use different browser like chrome?

It's not really a critical issue, just wanted to report it.

> 
> 2. EXPLAIN does not display at all; the contents of the EXPLAIN tab are
> always empty.
> 
> I am not able to re-produce the issue on my side (Refer screenshot).
> Could you provide more details on this so that we can re-produce the issue?

Sure, what details are you looking for, other than screenshots?

I can repro this on a AMI, so maybe it'll be better if I just give you
SSH to it.  Private email coming.

-- 
--
Josh Berkus
Red Hat OSAS
(any opinions are my own)


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


Re: [pgadmin-support] pgAdmin4 - cannot run on Debian 8

2016-10-24 Thread Johann Spies
On Mon, Oct 24, 2016 at 01:01:35PM -0200, André Cardoso wrote:
> 
> How can I set pip to use proxy?

Just a guess:  try setting the shell variable (bash?) like this:

PROXY=http://someproxy.somewhere.org:3128 

and then run pip.

Regards
JOhann
-- 
Johann SpiesTelefoon: 021-808 4699
Databestuurder /  Data manager  Faks: 021-883 3691

Sentrum vir Navorsing oor Evaluasie, Wetenskap en Tegnologie
Centre for Research on Evaluation, Science and Technology 
Universiteit Stellenbosch.

The integrity and confidentiality of this email is governed by these terms / 
Hierdie terme bepaal die integriteit en vertroulikheid van hierdie epos. 
http://www.sun.ac.za/emaildisclaimer


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