Обсуждение: Query tool - file browser

Поиск
Список
Период
Сортировка

Query tool - file browser

От
Johann Spies
Дата:
pts rule name              description---- ----------------------
---------------------------------------------------1.0ALL_TRUSTED            Passed through trusted hosts only via SMTP
0.5RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain 2.5 BAYES_50               BODY: Bayes
spamprobability is 40 to 60%                            [score: 0.5000]
 
X-Pg-Spam-Score: -4.2 (----)

After several months I am trying out pgadmin4 again to see whether it is
usable now.  This time installed in a virtual environment and using the
browser.

This is on Debian stretch.

I am struggling to find out how to use sql-files from the query-tool.
When I try to open my home directory (with file type "All files") it
does not find my home directory.  The gui seems to start at /.  Why?

I do not want to use a graphical filemanager to drag a file to the gui
every time I want to use a pre-existing query.

Regards
Johann
-- 
Johann Spies                            Telefoon: 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
vertroulikheidvan hierdie epos. http://www.sun.ac.za/emaildisclaimer
 


Re: Query tool - file browser

От
Johann Spies
Дата:
pts rule name              description---- ----------------------
---------------------------------------------------1.0ALL_TRUSTED            Passed through trusted hosts only via SMTP
0.5RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain 2.5 BAYES_50               BODY: Bayes
spamprobability is 40 to 60%                            [score: 0.5000]
 
X-Pg-Spam-Score: -4.2 (----)


> I am struggling to find out how to use sql-files from the query-tool.
> When I try to open my home directory (with file type "All files") it
> does not find my home directory.  The gui seems to start at /.  Why?
> 

After deleting the database in ~/pgadmin and restarting pgadmin4 and
reconfiguring the settings I can now open files and the server seems to
find my filesystem. Earlier it told me that my home directory did not
exist.

Regards
Johann
-- 
Johann Spies                            Telefoon: 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
vertroulikheidvan hierdie epos. http://www.sun.ac.za/emaildisclaimer
 


Re: Query tool - file browser

От
Dave Page
Дата:


On Wed, Sep 13, 2017 at 11:26 AM, Johann Spies <jspies@sun.ac.za> wrote:
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]
X-Pg-Spam-Score: -4.2 (----)


> I am struggling to find out how to use sql-files from the query-tool.
> When I try to open my home directory (with file type "All files") it
> does not find my home directory.  The gui seems to start at /.  Why?
>

After deleting the database in ~/pgadmin and restarting pgadmin4 and
reconfiguring the settings I can now open files and the server seems to
find my filesystem. Earlier it told me that my home directory did not
exist.

If you're running in Server mode (SERVER_MODE=True), then file storage is (by default) on the server, in a per-user directory. This is so that you have access to your files no matter where you login to pgAdmin from and to prevent users from browsing the filesystem on your server. 

If you're running in Desktop mode (SERVER_MODE=False), then you should have access to the entire local filesystem.

See the STORAGE_DIR parameter in config.py (if you need to change it, create - if needed - config_local.py in the same directory, and override the setting there).

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

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

Re: Query tool - file browser

От
Dave Page
Дата:


On Wed, Sep 13, 2017 at 11:26 AM, Johann Spies <jspies@sun.ac.za> wrote:
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]
X-Pg-Spam-Score: -4.2 (----)


> I am struggling to find out how to use sql-files from the query-tool.
> When I try to open my home directory (with file type "All files") it
> does not find my home directory.  The gui seems to start at /.  Why?
>

After deleting the database in ~/pgadmin and restarting pgadmin4 and
reconfiguring the settings I can now open files and the server seems to
find my filesystem. Earlier it told me that my home directory did not
exist.

If you're running in Server mode (SERVER_MODE=True), then file storage is (by default) on the server, in a per-user directory. This is so that you have access to your files no matter where you login to pgAdmin from and to prevent users from browsing the filesystem on your server. 

If you're running in Desktop mode (SERVER_MODE=False), then you should have access to the entire local filesystem.

See the STORAGE_DIR parameter in config.py (if you need to change it, create - if needed - config_local.py in the same directory, and override the setting there).

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

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

Re: Query tool - file browser

От
Dave Page
Дата:


On Wed, Sep 13, 2017 at 1:48 PM, Johann Spies <jspies@sun.ac.za> wrote:
On Wed, Sep 13, 2017 at 11:56:39AM +0100, Dave Page wrote:

> If you're running in Server mode (SERVER_MODE=True), then file storage is
> (by default) on the server, in a per-user directory. This is so that you
> have access to your files no matter where you login to pgAdmin from and to
> prevent users from browsing the filesystem on your server.
>
> If you're running in Desktop mode (SERVER_MODE=False), then you should have
> access to the entire local filesystem.

Thanks David.

I have tried to run it in Desktop mode, but setting SERVER_MODE=False
does not make a difference:

(pgadmin4.1.6) 14:47:02 js@sitasie:~/pgadmin4.1.6/lib/python3.6/site-packages/pgadmin4$ python3.6 pgAdmin4.py
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
 

Changing SERVER_MODE won't change what you see on the command line, but it certainly should change the root of the file browser, unless you've overridden the default config to prevent it.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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

Re: Query tool - file browser

От
Johann Spies
Дата:
pts rule name              description---- ----------------------
---------------------------------------------------1.0ALL_TRUSTED            Passed through trusted hosts only via SMTP
0.5RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain 2.5 BAYES_50               BODY: Bayes
spamprobability is 40 to 60%                            [score: 0.5000]
 
X-Pg-Spam-Score: -4.2 (----)

I have now tried a different approach by installing pgadmin4 source and
building it within an enclosed environment.

My conclusion is that pgadmin4.1-6 is not ready use on Debian.

I will try again in a few months time.

Regards
Johann
-- 
Johann Spies                            Telefoon: 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
vertroulikheidvan hierdie epos. http://www.sun.ac.za/emaildisclaimer
 


Re: Query tool - file browser

От
Dave Page
Дата:


On Wed, Sep 13, 2017 at 3:21 PM, Johann Spies <jspies@sun.ac.za> wrote:
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]
X-Pg-Spam-Score: -4.2 (----)

I have now tried a different approach by installing pgadmin4 source and
building it within an enclosed environment.

My conclusion is that pgadmin4.1-6 is not ready use on Debian.

I will try again in a few months time.

It works fine on Debian, however, as far as I can tell you didn't try what I suggested to resolve the problem you reported. 

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

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

Re: Query tool - file browser

От
Dave Page
Дата:


On Wed, Sep 13, 2017 at 3:21 PM, Johann Spies <jspies@sun.ac.za> wrote:
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]
X-Pg-Spam-Score: -4.2 (----)

I have now tried a different approach by installing pgadmin4 source and
building it within an enclosed environment.

My conclusion is that pgadmin4.1-6 is not ready use on Debian.

I will try again in a few months time.

It works fine on Debian, however, as far as I can tell you didn't try what I suggested to resolve the problem you reported. 

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

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

Re: Query tool - file browser

От
Johann Spies
Дата:
pts rule name              description---- ----------------------
---------------------------------------------------1.0ALL_TRUSTED            Passed through trusted hosts only via SMTP
0.5RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain 2.5 BAYES_50               BODY: Bayes
spamprobability is 40 to 60%                            [score: 0.4999]
 
X-Pg-Spam-Score: -4.2 (----)


> It works fine on Debian, however, as far as I can tell you didn't try what
> I suggested to resolve the problem you reported.

I did do that.  I could solve the original problem but I could not get
the desktop version to work which I prefer to work with.

As long as the installation causes so much effort to get it going, it is
not worth while.

Regards
Johann

-- 
Johann Spies                            Telefoon: 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
vertroulikheidvan hierdie epos. http://www.sun.ac.za/emaildisclaimer
 


Re: Query tool - file browser

От
Melvin Davidson
Дата:
Johann,

I also had a problem with the desktop version 1.6. The problem turn
out to be related to Python environment variables. I resolved as follows:
1. temporarily remove any Python environment variables
EG: PYTHONPATH
2. Remove any previous PgAdmin4 files
3. Reinstall PgAdmin v1.6
4. Add back the Python environment vars.

Melvin Davidson 🎸
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com



On Thursday, September 14, 2017, 2:11:38 AM EDT, Johann Spies <jspies@sun.ac.za> wrote:


  pts rule name              description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50              BODY: Bayes spam probability is 40 to 60%
                            [score: 0.4999]
X-Pg-Spam-Score: -4.2 (----)


> It works fine on Debian, however, as far as I can tell you didn't try what
> I suggested to resolve the problem you reported.

I did do that.  I could solve the original problem but I could not get
the desktop version to work which I prefer to work with.

As long as the installation causes so much effort to get it going, it is
not worth while.

Regards

Johann


--
Johann Spies                            Telefoon: 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


Re: Query tool - file browser

От
Melvin Davidson
Дата:
Johann,

I also had a problem with the desktop version 1.6. The problem turn
out to be related to Python environment variables. I resolved as follows:
1. temporarily remove any Python environment variables
EG: PYTHONPATH
2. Remove any previous PgAdmin4 files
3. Reinstall PgAdmin v1.6
4. Add back the Python environment vars.

Melvin Davidson 🎸
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com



On Thursday, September 14, 2017, 2:11:38 AM EDT, Johann Spies <jspies@sun.ac.za> wrote:


  pts rule name              description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.5 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
  2.5 BAYES_50              BODY: Bayes spam probability is 40 to 60%
                            [score: 0.4999]
X-Pg-Spam-Score: -4.2 (----)


> It works fine on Debian, however, as far as I can tell you didn't try what
> I suggested to resolve the problem you reported.

I did do that.  I could solve the original problem but I could not get
the desktop version to work which I prefer to work with.

As long as the installation causes so much effort to get it going, it is
not worth while.

Regards

Johann


--
Johann Spies                            Telefoon: 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