public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: Dave Cramer <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Tatsuo Ishii <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Using defines for protocol characters
Date: Mon, 07 Aug 2023 14:24:58 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoZ=XfKEqiq80SbN0R_XpLnnkgjGuO5WBTL0nYTseKD4TQ@mail.gmail.com>
References: <CAHut+PuE-3tc_6m06bwnjftk2KBM728ZSDhuL1_=vRCfEGMZ1A@mail.gmail.com>
	<[email protected]>
	<CADK3HH+aXM82oY-tUzidBS1bfqoUFubVxygmFaBFZFV=3iHYdw@mail.gmail.com>
	<CA+TgmoZ=XfKEqiq80SbN0R_XpLnnkgjGuO5WBTL0nYTseKD4TQ@mail.gmail.com>

Robert Haas <[email protected]> writes:
> IMHO, the correspondence between the names in the patch and the
> traditional names in the documentation could be stronger. For example,
> the documentation mentions EmptyQueryResponse and
> NegotiateProtocolVersion, but in this patch those become
> PQMSG_RESP_NEGOTIATE_PROTOCOL and PQMSG_RESP_EMPTY_QUERY. I think we
> could consider directly using the names from the documentation, right
> down to capitalization, perhaps with a prefix, but I'm also totally
> fine with this use of uppercase letters and underscores. But why not
> do a strict translation, like EmptyQueryResponse ->
> PQMSG_EMPTY_QUERY_RESPONSE, NegotiateProtocolVersion ->
> PQMSG_NEGOTIATE_PROTOCOL_VERSION? To me at least, the current patch is
> inventing new and slightly different names for things that already
> have names...

+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.

			regards, tom lane






view thread (18+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Using defines for protocol characters
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox