Re: Request for comment on setting binary format output per session

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Request for comment on setting binary format output per session
Дата
Msg-id 963304.1679339348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Request for comment on setting binary format output per session  (Dave Cramer <davecramer@gmail.com>)
Ответы Re: Request for comment on setting binary format output per session  (Dave Cramer <davecramer@gmail.com>)
Re: Request for comment on setting binary format output per session  (Dave Cramer <davecramer@gmail.com>)
Список pgsql-hackers
Dave Cramer <davecramer@gmail.com> writes:
> On Mon, 20 Mar 2023 at 13:05, Jeff Davis <pgsql@j-davis.com> wrote:
>> 2. Easy to confuse psql:
>> 
>> CREATE TABLE a(d date, t timestamptz);
>> SET format_binary='25,1082,1184';
>> SELECT * FROM a;
>> d | t
>> ---+---
>> ! |
>> (1 row)
>> 
>> Well I'm guessing psql doesn't know how to read date or timestamptz in
>> binary. This is not a failing of the code.

What it is is a strong suggestion that controlling this via a GUC is
not a great choice.  There are many inappropriate (wrong abstraction
level) ways to change a GUC and thereby break a client that's not
expecting binary output.  I think Jeff's suggestion that we should
treat this as a protocol extension might be a good idea.

If I recall the protocol-extension design correctly, such a setting
could only be set at session start, which could be annoying --- at the
very least we'd have to tolerate entries for unrecognized data types,
since clients couldn't be expected to have checked the list against
the current server in advance.

            regards, tom lane



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

Предыдущее
От: "Gregory Stark (as CFM)"
Дата:
Сообщение: Re: Eliminating SPI from RI triggers - take 2
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Request for comment on setting binary format output per session