pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Database issues when adding GUI
Date: Mon, 7 Jun 2021 09:00:11 -0700 (PDT)
Message-ID: <alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com> (raw)
In-Reply-To: <d6ebeb4b-d4f6-0d8d-1582-dba827ec9376@aklaver.com>
References: <alpine.LNX.2.20.2106070748380.1822@salmo.appl-ecosys.com>
	<48392c33-d63e-15be-e7de-d7a7c0c2fd80@gmail.com>
	<34B90F57-654D-4170-A7E9-613EB40A952C@americanefficient.com>
	<alpine.LNX.2.20.2106070831360.1822@salmo.appl-ecosys.com>
	<d6ebeb4b-d4f6-0d8d-1582-dba827ec9376@aklaver.com>

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






view thread (54+ messages)  latest in thread

Message-ID: <alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com>
Permalink:  ../alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com/
Also on:    postgresql.org/message-id/alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rshepard@appl-ecosys.com
  Subject: Re: Database issues when adding GUI
  In-Reply-To: <alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com>
  References: <alpine.LNX.2.20.2106070748380.1822@salmo.appl-ecosys.com> <48392c33-d63e-15be-e7de-d7a7c0c2fd80@gmail.com> <34B90F57-654D-4170-A7E9-613EB40A952C@americanefficient.com> <alpine.LNX.2.20.2106070831360.1822@salmo.appl-ecosys.com> <d6ebeb4b-d4f6-0d8d-1582-dba827ec9376@aklaver.com> <alpine.LNX.2.20.2106070857400.1822@salmo.appl-ecosys.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox