Re: Using defines for protocol characters

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Cramer <davecramer(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)lists(dot)postgresql(dot)org, nathandbossart(at)gmail(dot)com
Subject: Re: Using defines for protocol characters
Date: 2023-08-07 18:59:01
Message-ID: CA+TgmoYhA4Df2euFVK24NU9qkcHZBfbJTsr9M=4UWsr+sayD8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 7, 2023 at 2:25 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> +1. For ease of greppability, maybe even PQMSG_EmptyQueryResponse
> and so on? Then one grep would find both uses of the constants and
> code/docs references. Not sure if the prefix should be all-caps or
> not if we go this way.

PqMsgEmptyQueryResponse or something like that seems better, if we
want to keep the current capitalization. I'm not a huge fan of the way
we vary our capitalization conventions so much all over the code base,
but I think we would at least do well to keep it consistent from one
end of a certain identifier to the other.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-08-07 19:02:19 Re: Configurable FP_LOCK_SLOTS_PER_BACKEND
Previous Message Christoph Heiss 2023-08-07 18:49:04 Re: [PATCH] psql: Add tab-complete for optional view parameters