pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: iomihai@hotmail.com
Subject: BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'
Date: Thu, 02 Apr 2020 15:55:18 +0000
Message-ID: <16338-b198c8cc2395ba5f@postgresql.org> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <16338-b198c8cc2395ba5f@postgresql.org>
Permalink:  ../16338-b198c8cc2395ba5f@postgresql.org/
Also on:    postgresql.org/message-id/16338-b198c8cc2395ba5f@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, iomihai@hotmail.com
  Subject: Re: BUG #16338: casting interval '24h' to time returns '00:00:00' instead of '24:00:00'
  In-Reply-To: <16338-b198c8cc2395ba5f@postgresql.org>
  References: <16338-b198c8cc2395ba5f@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox