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

From Vitaly Burovoy
Subject Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
Date
Msg-id CAKOSWNmQrzkgYtVx1nh2hqr8j1skgg4XZakSanOerJAuax4Rvg@mail.gmail.com
Whole thread Raw
In response to Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]  (Vik Fearing <vik@2ndquadrant.fr>)
List pgsql-hackers
On 1/4/16, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> Vitaly Burovoy wrote:
>
>> Majority of the votes for NULL for "other things" except epoch.
>> Nobody answers about differences between monotonic and oscillating
>> values.
>>
>> 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.
>
> It seems we got majority approval on the design of this patch, and no
> disagreement; the last submitted version appears to implement that.
> There's no documentation change in the patch though.  I'm marking it as
> Waiting on Author; please resubmit with necessary doc changes.
>
> Thanks,
>
> --
> Álvaro Herrera                http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

Thank you!
Version 3 of the patch with touched documentation in the attachment.

I decided to mark it as a note, because that separation
(monotonic/oscillation fields) is not obvious and for most values the
function "extract" works as expected (e.g. does not give an error)
until special values are (casually?) passed.
--
Best regards,
Vitaly Burovoy

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE behind-the-scenes effects' CONTEXT
Next
From: Tomas Vondra
Date:
Subject: Re: GIN data corruption bug(s) in 9.6devel