From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Transform groups |
Date: | 2003-04-29 19:34:36 |
Message-ID: | 4980.1051644876@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> The SQL standard defines a concept called "transform groups", which are
> basically pairs of input/ouput functions that can be switched between.
> Is this something worth investigating?
Perhaps, but there is little time left to get it done for 7.4. Can we
lay out a strategy that will let us add such things incrementally,
without another protocol break later?
What I had personally been planning to do was restore the typsend and
typreceive columns of pg_type, defined on the order of
typsend(mytype) returns bytea
typreceive(bytea) returns mytype
and then define some simple conventions, probably network-byte-order
based, that these functions would be expected to adhere to for the
external binary representation. The on-the-wire representation is
a network-byte-order length followed by whatever contents the
send routines put into their bytea results.
I don't think this would scale very well to multiple external
representations, though; sure you could define a switch somewhere, but
what are the odds that N different send/receive functions would all pay
attention to it? And how would you know if they didn't?
The implementations of these functions would probably mostly depend on a
small set of conversion routines similar to the existing pq_getint and
pq_putint routines, so it might be possible to do simple things like
switching endianness in a centralized way. But I'm not sure what
happens if you want bigger changes than that.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-29 19:36:34 | Re: Cygwin PostgreSQL CVS build issues |
Previous Message | Jan Wieck | 2003-04-29 19:30:18 | Re: FOR EACH STATEMENT triggers |
From | Date | Subject | |
---|---|---|---|
Next Message | roberto | 2003-04-30 05:36:40 | Inquiry From Form [pgsql] |
Previous Message | Peter Eisentraut | 2003-04-29 17:58:48 | Transform groups |