From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
Cc: | Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] |
Date: | 2015-11-17 16:24:13 |
Message-ID: | 32534.1447777453@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2015-11-17 16:28:32 | new full text search configurations |
Previous Message | Robert Haas | 2015-11-17 16:14:16 | Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] |