PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16338
PG Version12.2
OSArch Linux, Ubntu
Opened2020-04-02 15:55:18+00
Reported byIo Mihai

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16338
Logged by:          Io Mihai
Email address:      (redacted)
PostgreSQL version: 12.2
Operating system:   Arch Linux, Ubntu

While casting intervals to time I noticed interval '24h' casts to '00:00:00'
time rather than '24:00:00'
Casting first to text or varchar then to time works as expected
select (interval '24h')::time; => '00:00:00'
select (interval '24h')::text::time => '24:00:00';
I experienced this in PostgreSQL  9 -12 .
Is this a bug or is this how it is supposed to work?

Thank you,


2020-04-02 15:55:18+00PG Bug reporting formBUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'
2020-04-02 16:05:59+00Tom LaneRe: BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'