Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam
Дата
Msg-id CAB7nPqRUvnbAsbSU_Ra56tFkKYhpY700M-S1pG7dHaUAKGsHiA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Mar 30, 2016 at 10:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> On Wed, Mar 30, 2016 at 6:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Allow to_timestamp(float8) to convert float infinity to timestamp infinity.
>
>> Some of the tests introduced are making MSVC unhappy, because they
>> depend on the three-digit behavior that Windows is using, leading to
>> those failures:
>
> Ah, I was wondering about that.  The patch as-submitted used "%lf" which
> seemed even less likely to be portable, but evidently %g isn't that much
> better.

Yep.

>> If the those tests are kept, an alternate output file is necessary (I
>> can send a patch if needed, I see the failure locally as well).
>
> I'm inclined to just drop the out-of-range test cases.  They're not that
> useful IMO, and alternate expected-files are a real PITA for maintenance.

Hm. Actually, they are quite useful to check error boundaries, so why
not just simplifying the error message to "timestamp out of range" and
remove the value from it?
-- 
Michael



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: VS 2015 support in src/tools/msvc