| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: ago(interval) → timestamptz |
| Date: | 2025-11-06 14:54:23 |
| Message-ID: | f50f5f0ac21493db560f7f046db6da38bc4336a6.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 2025-11-06 at 12:15 +0100, Florents Tselai wrote:
> > 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.
>
> I agree that only a timestamptz variant makes sense.
Lots of people model absolute time using "timestamp without time zone" with the
silent assumption that all such timestamps are UTC timestamps. That would be
the additional piece of information.
But I admit that that makes date arithmetic less useful.
There is an equivalent for "now()": localtimestamp
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bryan Green | 2025-11-06 14:56:14 | Re: [Patch] Windows relation extension failure at 2GB and 4GB |
| Previous Message | Chao Li | 2025-11-06 14:53:00 | Re: log_min_messages per backend type |