From: Nathan Bossart <nathandbossart@gmail.com>
To: Dave Cramer <davecramer@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Using defines for protocol characters
Date: Thu, 3 Aug 2023 11:53:56 -0700
Message-ID: <20230803185356.GA1144430@nathanxps13> (raw)
In-Reply-To: <CADK3HHJamHtwxP=uVuc=eqc-MtV4L6ORYJH4089fag_PmiQqLA@mail.gmail.com>
References: <CADK3HHKbBmK-PKf1bPNFoMC+oBt+pD9PH8h5nvmBQskEHm-Ehw@mail.gmail.com>
<20230803175940.vf3os5y37c7vrbwl@alvherre.pgsql>
<CADK3HHJamHtwxP=uVuc=eqc-MtV4L6ORYJH4089fag_PmiQqLA@mail.gmail.com>
On Thu, Aug 03, 2023 at 12:07:21PM -0600, Dave Cramer wrote:
> On Thu, 3 Aug 2023 at 11:59, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>> I don't really like the name pattern you've chosen though; I think we
>> need to have a common prefix in the defines. Maybe prepending PQMSG_ to
>> each name would be enough. And maybe turn the _RESPONSE and _REQUEST
>> suffixes you added into prefixes as well, so instead of PARSE_REQUEST
>> you could make it PQMSG_REQ_PARSE, PQMSG_RESP_BIND_COMPLETE and so
>> on.
>>
> That becomes trivial to do now that the names are defined. I presumed
> someone would object to the names.
> I'm fine with the names you propose, but I suggest we wait to see if anyone
> objects.
I'm okay with the proposed names as well.
> + * src/include/protocol.h
Could we put these definitions in an existing header such as
src/include/libpq/pqcomm.h? I see that's where the authentication request
codes live today.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
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: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, davecramer@gmail.com, alvherre@alvh.no-ip.org, pgsql-hackers@lists.postgresql.org
Subject: Re: Using defines for protocol characters
In-Reply-To: <20230803185356.GA1144430@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox