BUG #18007: age(timestamp, timestamp) is marked as immutable, but using age(date, date) says it's not
PG Bug reporting form <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: braiamp+pg@gmail.com
Date: 2023-06-29T17:08:25Z
Lists: pgsql-bugs
The following bug has been logged on the website: Bug reference: 18007 Logged by: Braiam Peguero Email address: braiamp+pg@gmail.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.