From: Todd R. <tr...@ko...> - 2003-03-04 16:42:10
|
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" <Bil...@mu...> To: "Todd Reed" <tr...@ko...> Cc: <pyp...@li...> 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. |