time values past 24:00:00 (or rather 23:59:60)

From: Christoph Berg <myon(at)debian(dot)org>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: time values past 24:00:00 (or rather 23:59:60)
Date: 2020-05-20 12:58:07
Message-ID: 20200520125807.GB296739@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

This is ok:

# select '23:59:60'::time;
time
──────────
24:00:00

# select '23:59:61'::time;
ERROR: 22008: date/time field value out of range: "23:59:61"

This is not ok:

# select '23:59:60.999'::time;
time
──────────────
24:00:00.999

-- value isn't read back:
# select '24:00:00.999'::time;
ERROR: 22008: date/time field value out of range: "24:00:00.999"

-- we can even go to :01
# select '23:59:60.9999999'::time;
time
──────────
24:00:01

PG 12.3.

Christoph

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2020-05-20 14:43:25 Re: Re : Re: BUG #16441: Cannot multi-insert into generated column with DEFAULT value
Previous Message Daniel Gustafsson 2020-05-20 12:05:28 Re: BUG #16343: Build problem: Install.pm "Could not find debug or release binaries"