Re: abstract Unix-domain sockets - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: abstract Unix-domain sockets
Date
Msg-id 20201110062431.GK1887@paquier.xyz
Whole thread Raw
In response to Re: abstract Unix-domain sockets  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: abstract Unix-domain sockets  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Mon, Nov 09, 2020 at 09:04:24AM +0100, Peter Eisentraut wrote:
> On 2020-11-09 07:08, Michael Paquier wrote:
> The @ is the standard way of representing this in the user interface and the
> configuration, so it seems sensible to me that way.

Ok.

> Can you sketch how you would structure this?  I realize it's not very
> elegant, but I couldn't come up with a better way that didn't involve having
> to duplicate some of the error messages into multiple branches.

I think that I would use a StringInfo to build each sentence of the
hint separately.  The first sentence, "Is another postmaster already
running on port %d?" is already known.  Then the second sentence could
be built depending on the two other conditions.  FWIW, I think that it
is confusing to mention in the hint to remove a socket file that
cannot be removed.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PATCH: Report libpq version and configuration
Next
From: Masahiko Sawada
Date:
Subject: Re: Temporary tables versus wraparound... again