Re: Problems with description structure

Gerhard Häring <[email protected]> Wed, 13 Aug 2003 13:48:37 +0200
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
Dick Kniep wrote:
> Hi there,
> 
> We are using pyPgSQL for a fairly complex system, and sofar everything
> worked very nicely, especially in combination with SQLDict. With the new
> version (2.4) however, there seems to be a problem with the description
> list.
> 
> The following code is used to get the description of the fields from a
> table:
> [...]
> I am also using the length parameter of the fields. In the previous
> version of pyPgSQL this was all working perfectly. However, in the
> current version, if I have a char field, no length is returned. So the
> program crashes when it wants to use this length.

Do you mean the displaysize field of cursor.description? In newer 
pyPgSQL releases this is indeed always set to None, because PostgreSQL 
versions 7.3 and later provide no means of getting at this information 
any more.

-- Gerhard


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01