type recv/send functions

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: type recv/send functions
Date: 2006-05-29 20:09:18
Message-ID: 87lksklhjl.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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 temporary bytea,
which is presumably then copied into the actual data stream.

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?

--
greg

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Smith 2006-05-29 20:16:09 Re: Proposal for debugging of server-side stored procedures
Previous Message Bruce Momjian 2006-05-29 19:39:50 Re: Compile libpq with vc8