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

From Gaetano Mendola
Subject Re: PostgreSQL 7.4.1 and pgdb.py
Date
Msg-id 401D7433.7060305@bigfoot.com
Whole thread Raw
In response to PostgreSQL 7.4.1 and pgdb.py  ("Manuel Tejada" <mantemu@terra.com.pe>)
List pgsql-general
Manuel Tejada wrote:
>
>>>>import pgdb
>>>>dbConnect = pgdb.connect(dsn='localhost:oracle', user='manuel',
>
> password='')
>
>>>>cursor = dbConnect.cursor()
>>>>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"
> ------------------

This is a really old problem already solved on 7.3 see this my post:

http://archives.postgresql.org/pgsql-bugs/2002-12/msg00082.php

I'm checking that my 7.4.1 installation is affected by the same
problem. I don't understand how this could happen that a modification
made on a 7.3 was not ported to 7.4

For the moment what you can do is substitute this select:

"SELECT typname, typprtlen, typlen "
"FROM pg_type WHERE oid = %s" % oid

inside the file pgdb.py with this one:

"SELECT typname, 4, typlen "
"FROM pg_type WHERE oid = %s" % oid

just to not break all file.

I'm not able to look at CVS to see where the modification was lost.

Regards
Gaetano Mendola


pgsql-general by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Functions in CHECK constraint not getting dumped before tables.
Next
From: Gaetano Mendola
Date:
Subject: Re: PostgreSQL 7.4.1 and pgdb.py