Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]

From: Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
Date: 2016-01-05 08:07:34
Message-ID: CAKOSWNmQrzkgYtVx1nh2hqr8j1skgg4XZakSanOerJAuax4Rvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/4/16, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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 Content-Type Size
extract_from_infinite_timestamp-v3.patch application/octet-stream 13.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-01-05 09:38:29 Re: GIN data corruption bug(s) in 9.6devel
Previous Message Simon Riggs 2016-01-05 06:45:47 Re: ALTER TABLE behind-the-scenes effects' CONTEXT