Re: [HACKERS] INT2OID, etc. - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: [HACKERS] INT2OID, etc.
Date
Msg-id m0y8PTf-00000oC@druid.net
Whole thread Raw
In response to Re: [HACKERS] INT2OID, etc.  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List pgsql-hackers
Thus spake Vadim B. Mikheev
> 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.

I think I'll write a program to extract this info and create a header
file.  Perhaps that program can be dropped into the distribution.
The only problem is that it has to be run after the system has been
built, installed and initialized so it has to be run separately.
Still, it's better than reinventing it for every package that needs it.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: [HACKERS] INT2OID, etc.
Next
From: t-ishii@sra.co.jp (Tatsuo Ishii)
Date:
Subject: Re: [HACKERS] Current 6.3 issues