Re: Extracting fields from 'infinity'::TIMESTAMP[TZ] - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
Date
Msg-id 1424580489.860510.1447087979420.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-hackers
> On Mon, Nov 9, 2015 at 8:22 AM, Kevin Grittner <kgrittn@ymail.com> wrote:
>> My first choice for other things would be NaN, but throwing an
>> error instead would be OK.


On Monday, November 9, 2015 10:41 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> What about returning NULL for the ill-defined cases?  That seems
> to comport with SQL's notion of NULL as "unknown/undefined".


On Monday, November 9, 2015 10:44 AM, Steve Crawford <scrawford@pinpointresearch.com> wrote:
> Given that null is a "special value that is used to indicate the
> absence of any data value" and that attributes like month or
> day-of-week will have no value for a date of infinity I'd be OK
> with returning null.


NULL seens clearly better than NaN or an error; I wish that had
occurred to me before I posted.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
Next
From: Jesper Pedersen
Date:
Subject: Re: Move PinBuffer and UnpinBuffer to atomics