Re: [HACKERS] INT2OID, etc.

Поиск
Список
Период
Сортировка
От Vadim B. Mikheev
Тема Re: [HACKERS] INT2OID, etc.
Дата
Msg-id 34F64BE9.8F29F120@sable.krasnoyarsk.su
обсуждение исходный текст
Ответ на INT2OID, etc.  (darcy@druid.net (D'Arcy J.M. Cain))
Ответы Re: [HACKERS] INT2OID, etc.
Re: [HACKERS] INT2OID, etc.
Список 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] INT2OID, etc.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Platforms with v6.3 trouble