Re: Fwd: understanding .description newbie ?

johnf <jfabiani-rLSQ/[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Tuesday 05 May 2009 10:22:58 am Adrian Klaver wrote:
> Forgot to reply to list.
>
> ----- Forwarded Message -----
> From: "Adrian Klaver" <[email protected]>
> To: "johnf" <jfabiani-rLSQ/[email protected]>
> Sent: Tuesday, May 5, 2009 10:09:04 AM GMT -08:00 US/Canada Pacific
> Subject: Re: [Psycopg] understanding .description newbie ?
>
> ----- "johnf" <jfabiani-rLSQ/[email protected]> 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.
> > --
> > John Fabiani
>
> test82:5432=# SELECT oid,typname from pg_type  where oid=1043;
>  oid  | typname
> ------+---------
>  1043 | varchar
>
>
> Adrian Klaver
> [email protected]

Thanks Adrian - you are always a help.


-- 
John Fabiani
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.