Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frFgA-0008RF-Na for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Aug 2018 04:51:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frFg7-000716-MM for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Aug 2018 04:51:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frFg7-00070x-0t for pgsql-hackers@lists.postgresql.org; Sun, 19 Aug 2018 04:51:03 +0000 Received: from smtp5.dreamhost.com ([64.90.62.174] helo=pdx1-sub0-mail-a18.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frFfz-00087h-Kz for pgsql-hackers@lists.postgresql.org; Sun, 19 Aug 2018 04:51:01 +0000 Received: from pdx1-sub0-mail-a18.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a18.g.dreamhost.com (Postfix) with ESMTP id A0BC681D35; Sat, 18 Aug 2018 21:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=7EVpNplzxZhsae fMlQ8zMOwdSNg=; b=IX+zU+05H0X2sZjtyUgE7qBuX9HWVoFa9aNnP90GPMRraV NekLwAeKAMD7+RQENbe2+ytfPcobcKmJeNRyh4ztIaiT8EK2LJWBGscDDtQ03sii pyliO17fMtFV5ySwaEhb4+ca4FTdsLjskaJEzi/9+78Ar6ywMkrQcHIu7vIxc= Received: from localhost (unknown [24.28.108.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 07D8681D1A; Sat, 18 Aug 2018 21:50:52 -0700 (PDT) Date: Sat, 18 Aug 2018 23:50:50 -0500 From: Nico Williams To: Tom Lane Cc: Thomas Munro , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Allowing printf("%m") only where it actually works Message-ID: <20180819045050.GB16780@localhost> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13183.1534624490@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.