Re: ago(interval) → timestamptz - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: ago(interval) → timestamptz
Date
Msg-id aa934a26-1923-497c-bcd0-8f50eaf135e4@proxel.se
Whole thread Raw
In response to Re: ago(interval) → timestamptz  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: ago(interval) → timestamptz
List pgsql-hackers
On 11/4/25 6:55 AM, Laurenz Albe wrote:
> Moreover, a good percentage of the users would instead need ago(interval) -> timestamp.

I don't get what users would need ago(interval) -> timestamp. That 
function would not make any sense since there is no equivalent to now() 
which returns timestamp, simply because a timestamp does not refer to 
any specific point in time and can only be interpreted with some 
additional piece of information like a time zone.

That said I can't get too excited about this patch since it is just a 
shorter way to write e.g. now() - interval '1 day'. It would also be 
quite funny to see all uses of ago('-1 day') for tomorrow.

Andreas




pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [Patch] Windows relation extension failure at 2GB and 4GB
Next
From: John Naylor
Date:
Subject: Re: GiST README typos