From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] |
Date: | 2015-11-17 15:24:51 |
Message-ID: | 564B46C3.9050006@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/17/15 2:09 AM, Vitaly Burovoy wrote:
> I suppose behavior of monotonic values (julian, century, decade,
> isoyear, millennium and year) should be the same as for epoch (which
> obviously also monotonic value).
> 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. It's absolutely NOT the same thing as a NULL
timestamp. I don't see why the normal constraint of minute < 60 should
apply here; infinity isn't a normal number.
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.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2015-11-17 15:27:34 | Re: Question concerning XTM (eXtensible Transaction Manager API) |
Previous Message | Tom Lane | 2015-11-17 14:43:03 | Re: Bug in numeric multiplication |