Re: [HACKERS] type recv/send functions

2006-05-29 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > "both return something" seems like an odd axis to measure. > In one case it's given pointer to the entire message, picks out the piece it's > interested in and advances the cursor. This is just a trivial optimization compared to being handed a bytea input,

Re: [HACKERS] type recv/send functions

2006-05-29 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: Stark <[EMAIL PROTECTED]> 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 argumen

Re: [HACKERS] type recv/send functions

2006-05-29 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> 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 obje

[HACKERS] type recv/send functions

2006-05-29 Thread Greg Stark
Is it just me or are the send/recv strangely asymmetric? It seems like the recv function is designed to avoid copying so the type can pick the data straight out of the data stream without passing through intermediate representations. But the send function forces the type to copy the data into a