Re: PostgreSQL 7.4.1 and pgdb.py - Mailing list pgsql-general

From Jeff Davis
Subject Re: PostgreSQL 7.4.1 and pgdb.py
Date
Msg-id 1075520547.21383.7.camel@jeff
Whole thread Raw
In response to PostgreSQL 7.4.1 and pgdb.py  ("Manuel Tejada" <mantemu@terra.com.pe>)
Responses Re: PostgreSQL 7.4.1 and pgdb.py  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
> >>>cursor.execute("select * from address")
> Traceback (most recent call last):
>    File "<stdin>", line 1, in ?
>    File "/usr/lib/python2.2/site-packages/pgdb.py", line 189, in execute
> self.executemany(operation, (params,))
>    File "/usr/lib/python2.2/site-packages/pgdb.py", line 221, in executemany
> desc = type[1:2]+self ._cache.getdescr(typ[2])
>    File "/usr/lib/python2.2/site-packages/pgdb.py", line 149, in getdescr
> self  ._source.execute(
> _pg.error: ERROR: non exist the column "typprtlen"

That's a column in a system catalog table (starts with "pg_"). The
pgdb.py must be trying to access an out of date version of the system
catalog.

You can probably get an updated pgdb.py somehow, or you can just use
"import pg" which has a different interface (non DBAPI-2.0 compliant)
but should work fine (since it doesn't try to access system catalogs,
it's more of a low-level PG interface for python).

In short, the problem exists in pgdb.py, which is trying to access
information in an out-of-date way.

Regards,
    Jeff Davis




pgsql-general by date:

Previous
From: Gregory Wood
Date:
Subject: Re: Two joins on same foreign key
Next
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL 7.4.1 and pgdb.py