Re: Using defines for protocol characters

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Using defines for protocol characters
Дата
Msg-id CADK3HHLtFuq8PDsV0+ryoqpSxnnPVrS752q5ra9QZ-SiLqVUXg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using defines for protocol characters  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Ответы Re: Using defines for protocol characters  (Dave Cramer <davecramer@gmail.com>)
Re: Using defines for protocol characters  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Список pgsql-hackers


On Thu, 3 Aug 2023 at 13:25, Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
> Greetings,
>
> Attached is a patch which introduces a file protocol.h. Instead of using
> the actual characters everywhere in the code this patch names the
> characters and removes the comments beside each usage.

> +#define DESCRIBE_PREPARED           'S'
> +#define DESCRIBE_PORTAL             'P'

You use these for Close message as well. I don't like the idea because
Close is different message from Describe message.

What about adding following for Close too use them instead?

#define CLOSE_PREPARED           'S'
#define CLOSE_PORTAL             'P'

Good catch. 
I recall when writing this it was a bit hacky.
What do you think of PREPARED_SUB_COMMAND   and PORTAL_SUB_COMMAND instead of duplicating them ?

Dave

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Track Oldest Initialized WAL Buffer Page
Следующее
От: David Rowley
Дата:
Сообщение: Re: Fix incorrect start up costs for WindowAgg paths (bug #17862)