Florian Weimer <fweimer@bfk.de> writes:
> I would like to add functionality which allows a client to tell the
> server which types can be sent in binary format. The immediate goal is
> to suppress hex quoting for BYTEA values, but it seems to make sense to
> make this functionality more general.
> This doesn't have to be a flag on the wire protocol, it could be a
> regular run-time parameter.
> Do you think this would make sense?
No. Especially not as a GUC. People have gotten this idea that they
can whack behavior around arbitrarily under the control of some GUC or
other, and that won't break things and create security holes. Generally
that's way too optimistic, and I think it's way too optimistic in this
particular case. As near as I can tell, you are proposing a GUC that
will cause the server to flat-out violate the existing protocol
document, ie send something in binary when the client's request clearly
specified text (or perhaps vice versa). That is a recipe for breakage,
not a recipe for making anybody's life better.
It might be good to add some ability like this when we do the next set
of protocol revisions. But trying to pretend that it's not a protocol
change will lead to nothing but a dangerous kluge.
regards, tom lane