From: | "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl> |
---|---|
To: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Data type OID numbers fixed? |
Date: | 2008-07-08 00:05:35 |
Message-ID: | 20080708000535.GA10491@cuci.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-08 00:14:42 | Re: \SET QUIET and \timing |
Previous Message | David E. Wheeler | 2008-07-08 00:03:34 | Re: PATCH: CITEXT 2.0 |