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

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group