Skip site navigation (1) Skip section navigation (2)

postgresql-7.3rc2 python interface fails

From: george young <gry(at)ll(dot)mit(dot)edu>
To: pygresql(at)vex(dot)net, pgsql-bugs(at)postgresql(dot)org
Subject: postgresql-7.3rc2 python interface fails
Date: 2002-11-26 19:44:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
[SuSE Linux 8.0, Postgresql-7.3rc2, gcc-3.2, python 2.2.1]
[using PyGresql v3.3 from the 7.3rc2 distribution]

Postgres install goes fine as a fresh install.  Psql access is fine.
Pgdb (the python interface) cursor.execute fails on any query; it asks for "pg_type.typprtlen",
which has apparently been deleted from postgresql 7.3:

sty:>  python
Python 2.2.1 (#1, Sep 25 2002, 17:25:00) 
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pgdb
>>> db=pgdb.connect(host='localhost',database='template1')
>>> cur=db.cursor()
>>> cur.execute('select * from pg_class')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.2/site-packages/", line 189, in execute
    self.executemany(operation, (params,))
  File "/usr/local/lib/python2.2/site-packages/", line 221, in executemany
    desc = typ[1:2]+self.__cache.getdescr(typ[2])
  File "/usr/local/lib/python2.2/site-packages/", line 149, in getdescr
_pg.error: ERROR:  Attribute "typprtlen" not found

From the postgres log, the offending query was:
    SELECT typname, typprtlen, typlen FROM pg_type WHERE oid = 19

What was typprtlen supposed to mean? 

Most of my postgres applications are written in python -- I *have* to have
a working python interface...

Problem also exists in PyGreSQL-3.4-pre020320.

-- George

George Young,  Rm. L-204		gry at
MIT Lincoln Laboratory
244 Wood St.
Lexington, Massachusetts  02420-9108	(781) 981-2756

SCSI is not magic. There are fundamental technical reasons why it
is necessary to sacrifice a young goat to your SCSI chain now and

pgsql-bugs by date

Next:From: bpalmerDate: 2002-11-26 20:59:21
Subject: regression hickups w/ freebsd.
Previous:From: Baiju MPDate: 2002-11-26 18:35:54
Subject: A little bug in postgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group