Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
От | Tom Lane |
---|---|
Тема | Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] |
Дата | |
Msg-id | 32534.1447777453@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
Список | pgsql-hackers |
Jim Nasby <Jim.Nasby@BlueTreble.com> writes: > On 11/17/15 2:09 AM, Vitaly Burovoy wrote: >> Proposed patch has that behavior: ±infinity for epoch, julian, >> century, decade, isoyear, millennium and year; NULL for other fields. > What's the logic behind NULL here? Infinity is infinity, whether it's > minutes or years. Didn't you follow the upthread discussion? Fields such as "minutes" are cyclic, so it's impossible to say either that they converge to a defined limit or diverge to infinity as x increases. NULL, in the sense of "unknown", seems like a reasonable representation of that. Infinity doesn't. > My specific fear is that now people will have to do a bunch of IF > timestamp IS NOT NULL THEN ... to get the behavior they need. Considering that the old behavior is to return zero, and we've had relatively few complaints about that, I doubt very many people are going to care. regards, tom lane
В списке pgsql-hackers по дате отправления: