BUG #18007: age(timestamp, timestamp) is marked as immutable, but using age(date, date) says it's not

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: braiamp+pg(at)gmail(dot)com
Subject: BUG #18007: age(timestamp, timestamp) is marked as immutable, but using age(date, date) says it's not
Date: 2023-06-29 17:08:25
Message-ID: 18007-036782307e002bf6@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18007
Logged by: Braiam Peguero
Email address: braiamp+pg(at)gmail(dot)com
PostgreSQL version: 15.3
Operating system: Debian
Description:

There's no much difference between timestamp and dateT00:00:00.000, yet
using age(date, date) for some reason internally doesn't type coerce
correctly into the appropriated types. I remember that on a previous
versions (not sure if it was 14) this wasn't the case, so I would consider
this a regression. I skimmed the release notes for 15 and only saw this note
"Mark the interval output function as stable, not immutable, since it
depends on IntervalStyle (Tom Lane) This will, for example, cause creation
of indexes relying on the text output of interval values to fail", which
doesn't seem to be relevant, since age(date::timestamp, date::timestamp)
doesn't seems to complain.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2023-06-29 17:45:36 Re: BUG #18007: age(timestamp, timestamp) is marked as immutable, but using age(date, date) says it's not
Previous Message Jacob Champion 2023-06-29 16:24:32 Re: pg_dump needs SELECT privileges on irrelevant extension table