pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Olivier <mo@local2me.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] libpq PQftype() to comprehend types?
Date: Thu, 11 Mar 1999 20:59:23 -0500
Message-ID: <22079.921203963@sss.pgh.pa.us> (raw)
In-Reply-To: <36E80EF2.634DB5DC@local2me.com>

Michael Olivier <mo@local2me.com> writes:
> Can someone tell me how I can use PQftype() or some other mechanism to
> interpret a query result in terms of the data types of the columns?

The PQftype value is the OID of the row for the type in the system
pg_type catalog.  Try

	SELECT * FROM pg_type WHERE oid = <PQftype result>

BTW: oid's for the predefined types are consistent across installations,
but oid's for user-defined types are not (and shouldn't even be trusted
across a save/reload).

			regards, tom lane



view thread (2+ messages)

Message-ID: <22079.921203963@sss.pgh.pa.us>
Permalink:  ../22079.921203963@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22079.921203963@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mo@local2me.com
  Subject: Re: [INTERFACES] libpq PQftype() to comprehend types?
  In-Reply-To: <22079.921203963@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox