Re: ImportError with libpq.so.2

"Todd Reed" <[email protected]>
Newsgroups gmane.comp.python.db.pypgsql.user
Organization Kojents Inc.
Message-ID <001101c2e26c$ef87b970$6501a8c0@quux>
I ended up installing pyPgSQL 2.3 from the source distribution, and this did
resolve the ImportError.  However, there is an incompatibility between
pyPgSQL 2.3 and PostgreSQL 7.3.2 (and possibly other 7.3.x releases).  The
system table pg_type used to have a column called "typprtlen" which is no
longer present in PostgreSQL 7.3.2.  pyPgSQL makes a query on pg_type that
attempts to access this non-existent column to obtain information for the
"description" field of cursor objects.  I ended up modifying the query to
always return -1; I think "typprtlen" was used to find the display width for
the column.

----- Original Message -----
From: "Billy G. Allie" <[email protected]>
To: "Todd Reed" <[email protected]>
Cc: <[email protected]>
Sent: Monday, March 03, 2003 10:15 PM
Subject: Re: [Pypgsql-users] ImportError with libpq.so.2


> "Todd Reed" wrote:
> > I had PostgreSQL 7.21 and pyPgSQL 2.2 installed and working on a RedHat
7.3
> > installation.  After upgrading to PostgreSQL 7.3.2, my scripts generated
an
> > ImportError as shown below:
> >
> > I found a copy libqp.so.2 in /usr/lib/pgsql/backup, and copied it to
> > /usr/lib.  After that, I received the following error:
> >
> > Any suggestions on fixing this problem?
>
> Todd,
>
> 1.  remove the libpq.so.2 from /usr/lib.
> 2.  get the latest source code from CVS or get the source distribution
from SF.
> 3.  build pyPgSQL 2.3 from source.
>
> The backup copy of libpq.so.2 was from the previous version of PostgreSQL
> and will not work.  The RPM was not built with the version of libpq.so you
> have for the newer version of PostgreSQL.  Building from the source should
> resolve the issutes your are expirencing.




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.