Re: Allowing printf("%m") only where it actually works - Mailing list pgsql-hackers

From Nico Williams
Subject Re: Allowing printf("%m") only where it actually works
Date
Msg-id 20180819045050.GB16780@localhost
Whole thread Raw
In response to Re: Allowing printf("%m") only where it actually works  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allowing printf("%m") only where it actually works
List pgsql-hackers
On Sat, Aug 18, 2018 at 04:34:50PM -0400, Tom Lane wrote:
> So now I'm about ready to propose that we just *always* use
> snprintf.c, and forget all of the related configure probing.

Yes.

> This'd have some advantages, notably that we'd get the
> useful_strerror() behavior in frontend as well as backend,
> assuming we converted all our frontend code to use %m.

You'd also get to ensure that all uses from *die() are
async-signal-safe.

You'd also ensure that snprintf.c gets maximal testing.

> And we'd not exactly be the first project to decide that.
> But it's kind of a big move from where we are today.
> 
> Thoughts?

I think that is the best approach.


pgsql-hackers by date:

Previous
From: Masayuki Takahashi
Date:
Subject: Re: How to estimate the shared memory size required for parallel scan?
Next
From: Tom Lane
Date:
Subject: Re: Allowing printf("%m") only where it actually works