Re: Database issues when adding GUI

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Database issues when adding GUI
Date: 2021-06-07 16:00:11
Message-ID: alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 7 Jun 2021, Adrian Klaver wrote:

> 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)

Adrian,

>>> con = psycopg2.connect(bustrac)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'bustrac' is not defined

That's because there's a problem with connecting to the database. See my
reply to Rob's message.

Thanks,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-06-07 16:00:38 Re: Database issues when adding GUI
Previous Message Tom Lane 2021-06-07 15:57:20 Re: Database issues when adding GUI