Received: from kodu.home.ee (isdn-54.uninet.ee [194.204.0.118]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA20410 for ; Tue, 4 May 1999 02:55:08 -0400 (EDT) (envelope-from hannu@trust.ee) Received: from trust.ee (hannu@localhost [127.0.0.1]) by kodu.home.ee (8.8.7/8.8.7) with ESMTP id JAA00478; Tue, 4 May 1999 09:59:19 +0300 Sender: hannu@kodu.home.ee Message-ID: <372E9AC7.965858D2@trust.ee> Date: Tue, 04 May 1999 09:59:19 +0300 From: Hannu Krosing Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?= X-Mailer: Mozilla 4.5 [en] (X11; U; Linux 2.2.6 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgreSQL.org CC: Tom Lane , "D'Arcy J.M. Cain" Subject: Re: [INTERFACES] Field types (was Re: Return value of int) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "D'Arcy J.M. Cain" wrote: > > Thus spake Tom Lane > > Hugh Lawson 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