News for hackers. Stuff that matters.
Re:PostgreSQL's Missing DateDiff Function by Nullabillity on Tuesday December 21, 2021 @05:51PM (#29643077)
Doesn't look like that works correctly for smaller units. For example:

    teo=> select extract(minutes from interval '70 minutes');
     date_part 
    -----------
            10
    (1 row)
For a sum this should return 70 (since there are obviously 70 minutes in total). Instead, it gets normalized to 1 hour and 10 minutes, and returns the minute component only.
Re:PostgreSQL's Missing DateDiff Function by jimktrains2 on Tuesday December 21, 2021 @06:51PM (#29643589)
I wouldn't say it's incorrect, but it is definitely different that what is sometimes needed.

The only, and unsatisfactory, answer I've seen to get a timedelta in wholey one unit is to extract the epoch and divide by the number of seconds in that unit.