Re: ago(interval) → timestamptz

From: Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com>
To: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ago(interval) → timestamptz
Date: 2026-07-24 05:45:59
Message-ID: CADrsxdayT2ckyehF9v5UY1GEVHoZ=oE161tE0yo0dYqYP8nPcA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the patch!

Thanks for the patch!

My views/opinion on the thread:-

1) I see no capability/logical gains, just aesthetic gains.

2) If we can think of ago(), why not a future equivalent? This creates an
asymmetry in the patch (ex: for checking future expiration dates, etc..).
Using ago('-1') for such cases looks funny, as Andreas already mentioned in
a previous comment.

3) It's not that users would be stuck if it's not there, like already
mentioned alternative 'current_timestamp - INTERVAL '1' DAY' by Laurenz or
say 'current_timestamp + INTERVAL '1' DAY' for future cases.

Regards,
Nishant Sharma,
EDB, Pune.
https://www.enterprisedb.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2026-07-24 06:04:04 Build warning with meson and dtrace on Fedora 43
Previous Message Xuneng Zhou 2026-07-24 05:40:16 Re: BUG: ReadStream look-ahead exhausts local buffers when effective_io_concurrency>=64