Re: Using defines for protocol characters

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: nathandbossart(at)gmail(dot)com
Cc: alvherre(at)alvh(dot)no-ip(dot)org, davecramer(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, peter(at)eisentraut(dot)org, robertmhaas(at)gmail(dot)com, smithpb2250(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Using defines for protocol characters
Date: 2023-08-15 05:46:24
Message-ID: 20230815.144624.47861227022067018.t-ishii@sranhm.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Is it possible to put the new define staff into protocol.h then let
pqcomm.h include protocol.h? This makes Pgpool-II and other middle
ware/drivers written in C easier to use the defines so that they only
include protocol.h to use the defines.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2023-08-15 05:48:40 Re: proposal: jsonb_populate_array
Previous Message Vik Fearing 2023-08-15 05:44:36 Re: proposal: jsonb_populate_array