I have this basic PostgreSQL query:
SELECT AGE('2021-01-21', '1942-11-20');
Which returns an interval in days:
output: 28531 days, 0:00:00
I am using PostgreSQL version 14, according to the docs, AGE() should return a symbolic result in years, months and days instead of just days.
Does anyone know why this interval is returned in days instead of in years, months, days?
age()in your database. Inpsqldo\df ageand add the results as update to your question.SELECT '2021-01-21'::date - '1942-11-20'::date; 28552so the result for your output is incorrect.