pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allowing printf("%m") only where it actually works
Date: Mon, 21 May 2018 00:36:53 -0400
Message-ID: <24986.1526877413@sss.pgh.pa.us> (raw)
In-Reply-To: <14176.1526874887@sss.pgh.pa.us>
References: <2975.1526862605@sss.pgh.pa.us>
	<CAEepm=29o4wi5WEBFfwhBUuiYSymbTcORw_cvdaaxPPoAkrsvA@mail.gmail.com>
	<14176.1526874887@sss.pgh.pa.us>

... and, while we're thinking about this, how can we prevent the reverse
problem of using strerror(errno) where you should have used %m?  That
is evidently not academic either, cf 81256cd.

I am wondering whether the elog/ereport macros can locally define some
version of "errno" that would cause a compile failure if it's referenced
within the macro args.  But I'm too tired to work it out in detail.

			regards, tom lane




view thread (50+ messages)  latest in thread

Message-ID: <24986.1526877413@sss.pgh.pa.us>
Permalink:  ../24986.1526877413@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24986.1526877413@sss.pgh.pa.us

 · 

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

* 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