| From: | Hannu Krosing <hannu(at)trust(dot)ee> |
|---|---|
| To: | pgsql-interfaces(at)postgreSQL(dot)org |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "D'Arcy J(dot)M(dot) Cain" <darcy(at){druid|vex}(dot)net> |
| Subject: | Re: [INTERFACES] Field types (was Re: Return value of int) |
| Date: | 1999-05-04 06:59:19 |
| Message-ID: | 372E9AC7.965858D2@trust.ee |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
"D'Arcy J.M. Cain" wrote:
>
> Thus spake Tom Lane
> > Hugh Lawson <hglawson(at)nr(dot)infi(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | abdelkrim | 1999-05-04 08:21:41 | Re: [INTERFACES] pb when creating user type |
| Previous Message | Michael Meskes | 1999-05-04 06:45:27 | Re: [INTERFACES] Error linking C++ code. |