Dave Cramer <pg@fastcrypt.com> writes:
> Hmmm maybe I should read before sending. It appears that both input,
> and output can be text. The only catch with output is that you have
> to do a describe first to get the types. This may negate any gains on
> small result sets, but certainly for large ones it would help.
Right, both parameters and results can be mixed, but to ask for
mixed-format result columns you have to know how many there are
... and in reality you probably want to know what the column
types are before you make your decisions, anyway. So unless the
driver has a-priori knowledge of the result column set, which I
gather it doesn't, there'd need to be an additional round trip
to fetch and inspect the query's result column set before issuing BIND.
I think that in practice most clients would do "all text all the time"
or "all binary all the time", which is why the protocol allows compact
selection of those two cases.
regards, tom lane