Re: Data type OIDs - Mailing list pgsql-novice

From Joe Conway
Subject Re: Data type OIDs
Date
Msg-id 4C34AF04.7020400@joeconway.com
Whole thread Raw
In response to Re: Data type OIDs  (Greg <grigorey@yahoo.co.uk>)
Responses Re: Data type OIDs
List pgsql-novice
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


Attachment

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Tablespaces
Next
From: Greg
Date:
Subject: Re: Data type OIDs