"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