Thread

Commits

  1. Accept "+infinity" in date and timestamp[tz] input.

  1. +infinity for dates and timestamps

    Vik Fearing <vik@postgresfriends.org> — 2023-01-01T02:10:23Z

    It has always annoyed me that we can't write '+infinity' for dates and 
    timestamps and get the OCD satisfaction of making our queries line up 
    with '-infinity'.
    
    I wrote a fix for that some time ago but apparently never posted it.  I 
    was reminded of it by jian he in the Infinite Interval thread, and so 
    here it is.
    -- 
    Vik Fearing
  2. Re: +infinity for dates and timestamps

    Vik Fearing <vik@postgresfriends.org> — 2023-01-01T02:31:51Z

    On 1/1/23 03:10, Vik Fearing wrote:
    > It has always annoyed me that we can't write '+infinity' for dates and 
    > timestamps and get the OCD satisfaction of making our queries line up 
    > with '-infinity'.
    > 
    > I wrote a fix for that some time ago but apparently never posted it.  I 
    > was reminded of it by jian he in the Infinite Interval thread, and so 
    > here it is.
    
    Hmm.  Somehow the .out test files were not included.
    
    Fixed with attached.
    -- 
    Vik Fearing
    
  3. Re: +infinity for dates and timestamps

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-01-01T05:24:30Z

    Vik Fearing <vik@postgresfriends.org> writes:
    > It has always annoyed me that we can't write '+infinity' for dates and 
    > timestamps and get the OCD satisfaction of making our queries line up 
    > with '-infinity'.
    
    +1, since it works for numerics it should work for these types too.
    (I didn't read the patch though.)
    
    			regards, tom lane
    
    
    
    
  4. Re: +infinity for dates and timestamps

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-01-01T19:21:04Z

    Vik Fearing <vik@postgresfriends.org> writes:
    > Hmm.  Somehow the .out test files were not included.
    > Fixed with attached.
    
    Somehow you'd managed to duplicate some of the other changes,
    so the cfbot still didn't like that :-(
    
    Anyway, pushed with cosmetic changes.  Notably, I left out the
    documentation changes after observing that we don't document
    "+infinity" separately for the numeric types.  Given the lack of
    complaints about that I think it's fine to do the same here.
    
    			regards, tom lane
    
    
    
    
  5. Re: +infinity for dates and timestamps

    Vik Fearing <vik@postgresfriends.org> — 2023-01-01T19:22:58Z

    On 1/1/23 20:21, Tom Lane wrote:
    > Vik Fearing <vik@postgresfriends.org> writes:
    >> Hmm.  Somehow the .out test files were not included.
    >> Fixed with attached.
    > 
    > Somehow you'd managed to duplicate some of the other changes,
    > so the cfbot still didn't like that :-(
    > 
    > Anyway, pushed with cosmetic changes.  Notably, I left out the
    > documentation changes after observing that we don't document
    > "+infinity" separately for the numeric types.  Given the lack of
    > complaints about that I think it's fine to do the same here.
    
    Thanks, Tom!  No objections to your changes.
    -- 
    Vik Fearing