Bug 143281 - postgresql-python stupid broken
postgresql-python stupid broken
Status: CLOSED DUPLICATE of bug 142711
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-17 18:55 EST by Jack Neely
Modified: 2013-07-02 23:03 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:07:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jack Neely 2004-12-17 18:55:22 EST
Description of problem:
The postgresql-python bindings are really stupidly broken.  These
weren't QA'd at all.  I've also seen this bug in FC3 betas, will
reporduce in FC3 final when I get it installed.

The pgdb.py gives wrong parameters to the type() function.  Normally,
you realize that any SQL at all breaks and you get the traceback:

Traceback (most recent call last):
  File "/home/slack/projects/current/src/current_apache.py", line 278,
in callAPIMethod
    result = apply(func, params)
  File "/home/slack/projects/current/src/api/cadmin.py", line 55, in
createChannel
    result['msg'] = db.db.makeChannel(channel)
  File "/home/slack/projects/current/src/db/currentdb.py", line 101,
in makeChannel
    (channel['name'],
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 188, in execute
    self.executemany(operation, (params,))
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 209, in
executemany
    raise OperationalError, "internal error in '%s'" % sql
OperationalError: internal error in 'INIT'

On line 209 of pgdb.py if you take out the 'raise OperationalError'
and let it raise what exception the try statement actually received
you get the following traceback:

Traceback (most recent call last):
  File "/home/slack/projects/current/src/current_apache.py", line 278,
in callAPIMethod
    result = apply(func, params)
  File "/home/slack/projects/current/src/api/cadmin.py", line 55, in
createChannel
    result['msg'] = db.db.makeChannel(channel)
  File "/home/slack/projects/current/src/db/currentdb.py", line 101,
in makeChannel
    (channel['name'],
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 188, in execute
    self.executemany(operation, (params,))
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 200, in
executemany
    sql = _quoteparams(operation, params)
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 299, in
_quoteparams
    params = tuple(map(_quote, params))
  File "/usr/lib/python2.3/site-packages/pgdb.py", line 279, in _quote
    elif type(x, (types.IntType, types.LongType, types.FloatType)):
TypeError: type() takes 1 or 3 arguments

There are several calls to type() that need to be fixed.  Please do so.

Version-Release number of selected component (if applicable):
I recently did a yum update after not doing so for a while.  The
busted package on my FC2 system is:  postgresql-python-7.4.6-1.FC2.1
Comment 1 Tom Lane 2004-12-18 15:24:47 EST
Upstream error :-(

*** This bug has been marked as a duplicate of 142711 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:07:44 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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