Re: PostgreSQL 7.4.1 and pgdb.py

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Manuel Tejada <mantemu(at)terra(dot)com(dot)pe>
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Date: 2004-02-01 21:48:35
Message-ID: 401D7433.7060305@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-02-01 21:58:37 Re: PostgreSQL 7.4.1 and pgdb.py
Previous Message Rajesh Kumar Mallah 2004-02-01 21:13:46 Functions in CHECK constraint not getting dumped before tables.