Re: type recv/send functions
| От | Tom Lane |
|---|---|
| Тема | Re: type recv/send functions |
| Дата | |
| Msg-id | 18984.1148957629@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | type recv/send functions (Greg Stark <gsstark@mit.edu>) |
| Ответы |
Re: type recv/send functions
|
| Список | pgsql-hackers |
Greg Stark <gsstark@mit.edu> writes:
> Is it just me or are the send/recv strangely asymmetric?
Not all that much: they both return a meaningful result. We cheated a
little bit by allowing the recv functions to modify the state of their
input argument, but they still deliver a valid result object.
> Wouldn't the natural thing to do be to provide the StringInfo buffer with a
> cursor for the type's send function to stuff the bytea into?
Then the send function would return void, which is surely not more
natural. Also, there would be a much larger disparity between the
behaviors of the text and binary output paths.
Anyway it's about three years too late to be debating this ;-)
regards, tom lane
В списке pgsql-hackers по дате отправления: