Re: [INTERFACES] Field types (was Re: Return value of int)
От | Hannu Krosing |
---|---|
Тема | Re: [INTERFACES] Field types (was Re: Return value of int) |
Дата | |
Msg-id | 372E9AC7.965858D2@trust.ee обсуждение исходный текст |
Ответ на | Re: [INTERFACES] Field types (was Re: Return value of int) ("D'Arcy" "J.M." Cain <darcy@druid.net>) |
Список | 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 по дате отправления: