Re: Using defines for protocol characters - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Using defines for protocol characters
Date
Msg-id 20230816.064420.306647592649809676.t-ishii@sranhm.sra.co.jp
Whole thread Raw
In response to Re: Using defines for protocol characters  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> On Wed, Aug 16, 2023 at 06:25:09AM +0900, Tatsuo Ishii wrote:
>> Currently pqcomm.h needs c.h which is not problem for Pgpool-II. But
>> what about other middleware?
> 
> Why do you need to include directly c.h?  There are definitions in
> there that are not intended to be exposed.

pqcomm.h has this:

#define UNIXSOCK_PATH(path, port, sockdir) \
       (AssertMacro(sockdir), \
        AssertMacro(*(sockdir) != '\0'), \
        snprintf(path, sizeof(path), "%s/.s.PGSQL.%d", \
                 (sockdir), (port)))

AssertMacro is defined in c.h.

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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Using defines for protocol characters
Next
From: Shaun Thomas
Date:
Subject: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue