Peter Harris (peter(dot)harris(at)kyndal(dot)co(dot)uk) reports a bug with a severity of 2
The lower the number the more severe it is.
python interface broken by removal of pg_type.typprtlen
Version 7.3.1, pg_type seems to no longer have a column called typprtlen. This is OK by me, as that column is considered 'unused'.
src/interfaces/python/pgdb.py expects it to be there, (line 150):
"SELECT typname, typprtlen, typlen "
"FROM pg_type WHERE oid = %s" % oid
ALL queries through pgdb.py fail with a traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/free/lib/python2.2/site-packages/pgdb.py", line 189, in execute
File "/free/lib/python2.2/site-packages/pgdb.py", line 221, in executemany
desc = typ[1:2]+self.__cache.getdescr(typ)
File "/free/lib/python2.2/site-packages/pgdb.py", line 149, in getdescr
_pg.error: ERROR: Attribute "typprtlen" not found
The field is returned as part of the return value of the cursor.description() method for Python's DB API v2.0, but I
don't know of any requirement for what the value is.
Accordingly, I am working around this by replacing with:
"SELECT typname, typlen as typprtlen, typlen "
>>> import pgdb
>>> cur.execute("select * from some_table")
... dies with traceback, as described.
No file was uploaded with this report
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2003-01-21 15:38:36|
|Subject: Re: Bug #879: python interface broken by removal of pg_type.typprtlen |
|Previous:||From: Averk||Date: 2003-01-21 01:08:44|
|Subject: stored procedure namespace bug (critical) + COALECSE notice|