[PyGreSQL] Can I get varchar/char field sizes of the query?

Christoph Zwerschke cito at online.de
Fri Aug 14 08:49:01 EDT 2009


Durumdara schrieb:
> I use Pygresql with DB2 api.
> I tried to see the query structure, because I must export to Delphi.
> 
> But I cannot see real sizes (100, 100) of char/vchar.
> 
> Have I any way to get these character field sizes from the query?

You mean using the cursor.description attribute? That's currently not 
supported. Only PQftype() is called internally; we would need to get the 
type modifier with PQfmod() as well. By the way, We could also call 
PQftable() to get the table the column belongs to - I think that has 
been requested recently. I have added this as a feature request to our 
future.txt list.

-- Christoph



More information about the PyGreSQL mailing list