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

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Request for comment on setting binary format output per session
Дата
Msg-id CADK3HHL-YMCi3jJK4ETMqKrzvA2catr=oGDcPjtOeJFxaNs5gg@mail.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  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers



On Tue, 18 Apr 2023 at 12:31, Dave Cramer <davecramer@gmail.com> wrote:


On Tue, 18 Apr 2023 at 12:24, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, Apr 18, 2023 at 11:51 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > One thing I think we should do in this area is introduce #defines for
> > all the message type codes and use those instead of having hard-coded
> > constants everywhere.
>
> +1, but I wonder where we should put those exactly.  My first thought
> was postgres_ext.h, but the charter for that is
>
>  *     This file contains declarations of things that are visible everywhere
>  *  in PostgreSQL *and* are visible to clients of frontend interface libraries.
>  *  For example, the Oid type is part of the API of libpq and other libraries.
>
> so picayune details of the wire protocol probably don't belong there.
> Maybe we need a new header concerned with the wire protocol?

Yeah. I sort of thought maybe one of the files in src/include/libpq
would be the right place, but it doesn't look like it.

If we at least created the defines and replaced occurrences with the same, then we can litigate where to put them later.

I think I'd prefer this in a different patch, but I'd be willing to take a run at it.

As promised here is a patch with defines for all of the protocol messages.
I created a protocol.h file and put it in src/includes
I'm fairly sure that some of the names I used may need to be changed but the grunt work of finding and replacing everything is done.

Dave Cramer 

Dave
Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: LLVM strip -x fails
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Tab completion for GRANT MAINTAIN