Bug 142711 - [python] Recent update breaks the pgdb module
[python] Recent update breaks the pgdb module
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
: 143281 152392 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-12-13 04:03 EST by Enrico Scholz
Modified: 2013-07-02 23:03 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-17 11:42:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2004-12-13 04:03:09 EST
Description of problem:

After upgrade to postgresql-7.4.6-1.FC2.1 the pgdb module stops to

| import pgdb
| db = pgdb.connect(host='db', database='mailstat')
| c  = db.cursor()
| c.execute("SELECT %u", (1,))

| Traceback (most recent call last):
|   File "<stdin>", line 4, in ?
|   File "/tmp/pgdb.py", line 188, in execute
|     self.executemany(operation, (params,))
|   File "/tmp/pgdb.py", line 209, in executemany
|     raise OperationalError, "internal error in '%s' (%s)" % (sql,e)
| pgdb.OperationalError: internal error in 'INIT'

This is caused by syntax like

|          elif type(x, (types.IntType, types.LongType, types.FloatType)):
|          elif type(x, (types.ListType, types.TupleType)):

which is not valid python code.

Version-Release number of selected component (if applicable):


How reproducible:


Additional info:

Marking this as HIGH priority as it breaks all python programs based
on pgdb which worked before the upgrade.
Comment 1 Tom Lane 2004-12-13 13:25:01 EST
Thanks for the report.  I checked with PyGreSQL's author, who replies:

This bug was fixed days later but I never made a new version.  I now
use isinstance() anyway which is the more correct method.

I will get 3.6 out right away with this and other fixes.

I'll roll out a new Fedora release as soon as I get 3.6 from him.
Comment 5 Tom Lane 2004-12-17 11:42:53 EST
Fixed (I trust) in this morning's release.
Comment 6 Tom Lane 2004-12-18 15:24:59 EST
*** Bug 143281 has been marked as a duplicate of this bug. ***
Comment 7 Tom Lane 2005-03-29 01:53:02 EST
*** Bug 152392 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.