pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: 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: Wed, 26 Sep 2018 12:40:22 -0400
Message-ID: <4961.1537980022@sss.pgh.pa.us> (raw)
In-Reply-To: <3034.1537974599@sss.pgh.pa.us>
References: <20180925154829.rbjxmmcpd5z7ueyq@alvherre.pgsql>
	<28378.1537891542@sss.pgh.pa.us>
	<20180925224223.GB1659@paquier.xyz>
	<3034.1537974599@sss.pgh.pa.us>

I wrote:
> While looking over the thread, I remembered I wanted to convert
> strerror_r into a wrapper as well.  Think I'll go do that next,
> because really it'd be better for snprintf.c to be calling strerror_r
> not strerror.

So while chasing that, I realized that libpq contains its own version
of the backend's win32_socket_strerror code, in libpq/win32.c.
This probably explains why we've not heard complaints about bogus
socket error reports from libpq; it's that code that's handling it.

What I think ought to happen is to merge win32.c's version of that
code into strerror.c, which'd allow removing win32.c and win32.h
altogether.  However, not having a Windows environment, I can't
test such changes and probably shouldn't be the one to take point
on making the change.  Anybody?

			regards, tom lane




view thread (50+ messages)  latest in thread

Message-ID: <4961.1537980022@sss.pgh.pa.us>
Permalink:  ../4961.1537980022@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4961.1537980022@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, michael@paquier.xyz, alvherre@2ndquadrant.com, thomas.munro@enterprisedb.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Allowing printf("%m") only where it actually works
  In-Reply-To: <4961.1537980022@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