Re: Database issues when adding GUI

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Database issues when adding GUI
Date: 2021-06-07 15:42:35
Message-ID: d6ebeb4b-d4f6-0d8d-1582-dba827ec9376@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/7/21 8:32 AM, Rich Shepard wrote:
> On Mon, 7 Jun 2021, Philip Semanchuk wrote:
>
>> I agree with Rich. Permissions, or you’re connecting as the wrong user.
>> You might find it helpful to simplify and not use a GUI application until
>> you get your connection issues sorted out. A simple command line Python
>> app that connects to the database and prints the result of “select * from
>> activitytypes limit 1” will enable quick(er) debugging of your connection
>> issues.
>
> Philip,
>
> I've used the psql shell for years. That's not a GUI.

What Philip is suggesting is to use Python only simple script to connect
to database and retrieve from table. Something like:

import psycopg2

con = psycopg2.connect(<connection_str>)
cur = con.cursor()
cur.execute('select * from activitytypes')
rs = cur.fetchall()
print(rs)

>
> bustrac=# select * from activitytypes;
>   act_name ------------
>  Phone
>  Email
>  Fax
>  Meeting
>  Conference
>  Referral
>  Called me
>  Other
> (8 rows)
>
> Rich
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2021-06-07 15:49:43 Re: Database issues when adding GUI
Previous Message Rob Sargent 2021-06-07 15:37:21 Re: Database issues when adding GUI