pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Cleaning up historical portability baggage
Date: Tue, 12 Jul 2022 10:09:22 -0400
Message-ID: <1522407.1657634962@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoaw6VBC9Xzr4vOaC0kc-94jb9nzH8MY38Gqn7=wy=i_3w@mail.gmail.com>
References: <CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com>
	<CA+Tgmoazusui5EoU_7Z=AgwC5pTAqDndTa7d-owjvQwG3zoRhg@mail.gmail.com>
	<CA+hUKGLLJUMDgCzOK5K4NE6PpU87Ka7t7RQsZoZAZ_EKfL5L+A@mail.gmail.com>
	<CA+Tgmoaw6VBC9Xzr4vOaC0kc-94jb9nzH8MY38Gqn7=wy=i_3w@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jul 11, 2022 at 9:11 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> Hmm, but that's not what we're doing in general.  For example, on
>> Windows we're redirecting open() to a replacement function of our own,
>> we're not using "pg_open()" in our code.  That's not an example based
>> on AC_REPLACE_FUNCS, but there are plenty of those too.  Isn't this
>> quite well established?

> Yes. I just don't care for it.
> Sounds like I'm in the minority, though.

I concur with your point that it's not great to use the standard name
for a function that doesn't have exactly the standard semantics.
But if it does, using a nonstandard name is not better.  It's just one
more thing that readers of our code have to learn about.

Note that "exactly" only needs to mean "satisfies all the promises
made by POSIX".  If some caller is depending on behavior details not
specified in the standard, that's the caller's bug not the wrapper
function's.  Otherwise, yeah, we couldn't ever be sure whether a
wrapper function is close enough.

			regards, tom lane





view thread (108+ messages)  latest in thread

Message-ID: <1522407.1657634962@sss.pgh.pa.us>
Permalink:  ../1522407.1657634962@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1522407.1657634962@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, robertmhaas@gmail.com, thomas.munro@gmail.com
  Subject: Re: Cleaning up historical portability baggage
  In-Reply-To: <1522407.1657634962@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