pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nico Williams <nico@cryptonector.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allowing printf("%m") only where it actually works
Date: Sat, 18 Aug 2018 23:50:50 -0500
Message-ID: <20180819045050.GB16780@localhost> (raw)
In-Reply-To: <13183.1534624490@sss.pgh.pa.us>
References: <20180528150125.j2x3mp62ssbeg3h5@alvherre.pgsql>
	<2685.1527520461@sss.pgh.pa.us>
	<8770.1533931511@sss.pgh.pa.us>
	<16896.1533935042@sss.pgh.pa.us>
	<14925.1534040609@sss.pgh.pa.us>
	<1437.1534100930@sss.pgh.pa.us>
	<13183.1534624490@sss.pgh.pa.us>

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.




view thread (50+ messages)  latest in thread

Message-ID: <20180819045050.GB16780@localhost>
Permalink:  ../20180819045050.GB16780@localhost/
Also on:    postgresql.org/message-id/20180819045050.GB16780@localhost

 · 

reply

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: nico@cryptonector.com, tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Allowing printf("%m") only where it actually works
  In-Reply-To: <20180819045050.GB16780@localhost>

* 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