lee Richard <clipper(dot)kenyon(at)gmail(dot)com> writes:
> I still can not see how it return a single return value to the client, and
> why it call FunctionCall1() again when it want to send the result.
pq_endmessage is where the bytes actually get pushed out to the client,
if that's what you're looking for. The rest of the activity in
SendFunctionResult is just concerned with constructing the message to be
sent within "buf".
regards, tom lane