Re: [INTERFACES] Field types (was Re: Return value of int) - Mailing list pgsql-interfaces

From Hannu Krosing
Subject Re: [INTERFACES] Field types (was Re: Return value of int)
Date
Msg-id 372E9AC7.965858D2@trust.ee
Whole thread Raw
In response to Re: [INTERFACES] Field types (was Re: Return value of int)  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
List pgsql-interfaces
"D'Arcy J.M. Cain" wrote:
> 
> Thus spake Tom Lane
> > Hugh Lawson <hglawson@nr.infi.net> writes:
> > > I'm just getting started on fiddling with libpq.  I am wondering why
> > > this passage from man libpq doesn't address this issue?  I'm not being
> > > a smarty here, I just don't know the answer.
> >
> > >  PQftype returns the field type associated with  the
> > >               given  field  index.  The  integer  returned  is an
> > >               internal coding of the type.
> >
> > Unless I missed what D'Arcy was getting at, his point was that when
> > PQftype tells you the field type is, say, 23, how do you know what
> > that means?

do "select * from pg_type where oid=23" and work from there on.

The 'internal coding' actually means OID for that type definition row.
(Could someone post a patch for docs ?)

the base types ids are quite stable and could possibly be found in some
.h file,
but anything new you add gets o quite random OID.

------------------
Hannu


pgsql-interfaces by date:

Previous
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [INTERFACES] Field types (was Re: Return value of int)
Next
From: "abdelkrim"
Date:
Subject: Re: [INTERFACES] pb when creating user type