Re: [HACKERS] INT2OID, etc.

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] INT2OID, etc.
Date: 1998-02-27 04:45:24
Message-ID: 199802270446.XAA25942@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> I am enhancing my PyGreSQL 2.0 package and I wanted to determine the
> types of returned fields. I tried using the manifest constans
> INT2OID, INT4OID, FLOAT4OID, etc but these are defined in the
> file src/include/catalog/pg_type.h which doesn't get installed
> into the public include directory. Am I right in assuming that
> external programs shouldn't use these values? Is there another
> way to get what I want? Is it considered acceptable for interface
> programs to use this header file? Inquiring minds want to know.

I will say that pg_dump does use it, but it is not really a 3rd party
library.

I recommend you use the file, and make them supply the pgsql source
directory as part of the compile, that way, you can access the files you
need directly. You can do a lookup in pg_type for the names of the
types you want. Maybe you can even write a little psql script to
extract the oid's you need from pg_type, convert the output to #defines,
and #include that in your compile.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Billy G. Allie 1998-02-27 04:46:47 Re: [HACKERS] Platforms with v6.3 trouble
Previous Message D'Arcy J.M. Cain 1998-02-27 04:32:45 INT2OID, etc.