Thread: age() and DateStyle ISO

age() and DateStyle ISO

From
Frank Bax
Date:
In an obscure part of my app that I haven't touched in many moons, I found
some code that contains:
    SET DateStyle = 'ISO'
and then a SELECT age(timestamp,timestamp) from ...

In my php code I then tested
     if ( strcmp( $row->age, "14 00:00" ) )
Sometime between 6.5.x [when the code was written] and 7.1 [current level]
the results from age() changed from "14 00:00" to "14 days"?  I notice the
columns are now defined as 'timestamp with timezone' which was probably
automatic as part of one upgrade on another (they were simply 'timestamp'
in 6.5 as I recall).

Did the standard change?  Was it never applicable to intervals?

Frank