BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00' - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'
Date
Msg-id 16338-b198c8cc2395ba5f@postgresql.org
Whole thread Raw
Responses Re: BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16338
Logged by:          Io Mihai
Email address:      iomihai@hotmail.com
PostgreSQL version: 12.2
Operating system:   Arch Linux, Ubntu
Description:

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,
Mihai


pgsql-bugs by date:

Previous
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: [BUG] non archived WAL removed during production crash recovery
Next
From: Tom Lane
Date:
Subject: Re: BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'