Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

PQftype() and Oid



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group