Re: Wire protocol: type-specific opt-in to binary format

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Wire protocol: type-specific opt-in to binary format
Дата
Msg-id 24437.1322153251@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Wire protocol: type-specific opt-in to binary format  (Florian Weimer <fweimer@bfk.de>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Making TEXT NUL-transparent
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Time bug with small years