Re: [HACKERS] INT2OID, etc.

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] INT2OID, etc.
Date: 1998-02-27 05:15:21
Message-ID: 34F64BE9.8F29F120@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

D'Arcy J.M. Cain wrote:
>
> 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.

On the one hand, client applications/interfaces shouldn't use
server internal constants like these but query database to get
type' name using type OIDs (like pg_dump does for \d-s).

On the other hand - performance! And ability to use constants
for built-in types is good thing.

I like second way (and so - we should copy pg_type to ~pgsql/include or
something like this) but it would be nice if you support more
general 1st way too.

Vadim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Billy G. Allie 1998-02-27 05:52:53 Re: [HACKERS] Platforms with v6.3 trouble
Previous Message Bruce Momjian 1998-02-27 05:14:05 Re: [HACKERS] Platforms with v6.3 trouble