Re: draft patch for strtof()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: draft patch for strtof()
Дата
Msg-id 8254.1547654846@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: draft patch for strtof()  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: draft patch for strtof()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>  Tom> The errno handling in strtof seems bizarrely overcomplex; why do
>  Tom> you need the separate caller_errno variable?

> Eh. I was preserving the conventional behaviour of setting errno only on
> errors and not resetting it to 0,

Oh, I see.  -ENOCAFFEINE.

> but I suppose you could argue that
> that is overkill given that the function is called only in one place
> that's supposed to have already set errno to 0.

Well, we probably oughtta endeavor to maintain compatibility with
the function's standard behavior, because other calls to it are
likely to creep in over time.  Objection withdrawn.

>  Tom> I'm not that much on board with introducing test cases that we
>  Tom> know, beyond question, are going to be portability headaches. What
>  Tom> will we actually gain with this, compared to just not having the
>  Tom> test case?

> The purpose of the test case is to ensure that we're getting the right
> values on input. If these values fail on any platform that anyone
> actually cares about, then I think we need to know about it.

Meh.  I think the actual outcome will be that we define any platform
that gets the wrong answer as one that we don't care about, mainly
because we won't have any practical way to fix it.  That being the
situation, trying to maintain a test case seems like pointless
make-work.

(FWIW, I'm running the patch on gaur's host, just to confirm it
does what you expect.  Should have an answer in an hour or so ...)

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name
Следующее
От: Robert Haas
Дата:
Сообщение: Re: What to name the current heap after pluggable storage / what to rename?