Re: Using defines for protocol characters

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Dave Cramer <davecramer@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>, Tatsuo Ishii <ishii@sraoss.co.jp>, robertmhaas@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2023-08-15T04:07:27Z
Lists: pgsql-hackers

Attachments

I tried to address all the feedback in v5 of the patch, which is attached.
I limited the patch to only the characters that have names in the "Message
Formats" section of protocol.sgml instead of trying to invent names for
unnamed characters.

I'm aware of one inconsistency.  While I grouped all the authentication
request messages ('R') into PqMsg_AuthenticationRequest, I added separate
macros for all the different meanings of 'p', i.e., GSSResponse,
PasswordMessage, SASLInitialResponse, and SASLResponse.  I wanted to list
everything in protocol.sgml (even the duplicateѕ) to ease greppability, but
the code is structure such that adding macros for all the different
authentication messages would be kind of pointless.  Plus, there is a
separate set of authentication request codes just below the added macros.
So, this is where I landed...

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Commits

  1. Introduce macros for protocol characters.

  2. Remove configure check for z_streamp