Re: Data type OIDs

Поиск
Список
Период
Сортировка
От Greg
Тема Re: Data type OIDs
Дата
Msg-id 361426.20952.qm@web24303.mail.ird.yahoo.com
обсуждение исходный текст
Ответ на Re: Data type OIDs  (Joe Conway <mail@joeconway.com>)
Список pgsql-novice
Cool. Thanks Joe! Thats exactly what I needed to know.



--- On Wed, 7/7/10, Joe Conway <mail@joeconway.com> wrote:

From: Joe Conway <mail@joeconway.com>
Subject: Re: [NOVICE] Data type OIDs
To: "Greg" <grigorey@yahoo.co.uk>
Cc: "Thom Brown" <thombrown@gmail.com>, pgsql-novice@postgresql.org
Date: Wednesday, 7 July, 2010, 17:44

On 07/07/2010 01:15 AM, Greg wrote:
> Hi Thom, well, it relates to reading/writing data using PostgreSQL
> protocol (v3). For example RowDescription message uses type OID to
> identify data type of the field. Same as with Parse message I need to
> specify OID of the parameter data type. As a result I want to declare an
> enum of all used data types and assignd PostgreSQL data type OID to
> appropriate value  - so development could be a little more intuitive.

I don't think there is any promise that type OIDs will never change, but
in practice they have been stable for many releases over 10+ years.

You should, however, use the macros in pg_type.h to refer to them, e.g.
INT8OID, TEXTOID, etc.

HTH,

Joe

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & Support


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Data type OIDs
Следующее
От: "John T. Dow"
Дата:
Сообщение: Re: Dropped table, no backup, restore from file system backup or WAL files?