Re: Cleaning up historical portability baggage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cleaning up historical portability baggage
Дата
Msg-id 1522407.1657634962@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cleaning up historical portability baggage  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sergey Dudoladov
Дата:
Сообщение: Introduce "log_connection_stages" setting.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: DropRelFileLocatorBuffers