Data type OID numbers fixed? - Mailing list pgsql-hackers

From Stephen R. van den Berg
Subject Data type OID numbers fixed?
Date
Msg-id 20080708000535.GA10491@cuci.nl
Whole thread Raw
Responses Re: Data type OID numbers fixed?  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Data type OID numbers fixed?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I'm in the process of finishing a native Protocol 3 PostgreSQL driver
written in Pike.
And while trying to make it make intelligent decisions regarding binary
or text encoding of different columns and parameters, I run into the
OIDs of types.

In looking through the specs, I decided that the following OIDtypes will
be (automatically) binary passed (both as results and as parameters),
all others will be passed as text:
   case 16:   // _bool   case 17:   // _bytea   case 18:   // _char   case 20:   // _int8   case 21:   // _int2   case
23:  // _int4   case 25:   // _text   case 142:  // _xml   case 829:  // _macaddr   case 869:  // _inet   case 1042: //
_bpchar  case 1043: // _varchar   case 1700: // _numeric   case 2950: // _uuid
 

How large is the probability of these numbers ever changing?
Should I extract them from a query at the beginning of the connection?
Or can I leave them hardcoded in the driver?
-- 
Sincerely,          Stephen R. van den Berg.

A truly wise man never plays leapfrog with a unicorn.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0
Next
From: "David E. Wheeler"
Date:
Subject: Re: \SET QUIET and \timing