PQftype() and Oid

From: Andro <andromede(at)gmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PQftype() and Oid
Date: 2006-08-04 14:38:20
Message-ID: da7021e0608040738l3b0880a1q5a76b838937f8c78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

Oids are in pg_type catalog (server side) and src/include/catalog/pg_type.h
(hard-wired).

But what should we compare the Oid returned by PQftype() with?
Let's say I want to check if column 1 is a VARCHAR, do I have to

if (PQftype(res,1) == 1043)
...;

?
Isn't there a kind of enum which we could rely on to find out types? What if
Oids change in pg_type.h?

Thanks

Charles

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Volkan YAZICI 2006-08-05 07:14:26 Re: PQftype() and Oid
Previous Message andy rost 2006-08-02 18:07:34 Re: Using FETCH ALL with descriptor areas