Re: understanding .description newbie ?
Adrian Klaver <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 05 May 2009 10:29:16 am johnf wrote:
> On Tuesday 05 May 2009 09:59:29 am johnf wrote:
> > Hi,
> > dbapi 2.0 defines what a cursor.description returns. In my case the
> > cursor.description returns {fieldName, someNumber, None,...}. I would
> > like to better understand what the "someNumber" means. How does python
> > know that '1043' is a varchar (python string??).
> >
> > Thanks in advance.
>
> A little more reseach revealed that the numbers are defined in pg_types.h (
> a header for postgres). If this is wrong would someone take the time to
> let me know. From what I see it is a very close match.
According to Tom Lane in the thread below, that is the way to go:
http://archives.postgresql.org//pgsql-hackers/2008-07/msg00353.php
--
Adrian Klaver
[email protected]