Re: BUG #1025: current_time accepts 24:00:00

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rexrecio(at)yahoo(dot)com
Cc: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1025: current_time accepts 24:00:00
Date: 2003-12-23 14:52:41
Message-ID: 3001.1072191161@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> I have a table containing 2 columns with default values of current_date and
> current_time. When I don't fill in the values, the current_time default
> sometimes fill-in a value of 24:00:00 instead of wrapping it to 00:00:00.

How is the time column actually declared? If it's got limited precision
(eg, time(0)) then I would expect a current_time value just before
midnight to be rounded to 24:00:00, eg, 23:59:59.765321 -> 24:00:00.
That's not a bug IMHO.

You would probably be better off to replace this design with a single
timestamp column.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-12-23 14:58:12 Re: problem with compile cvs
Previous Message Jeremy Rademan 2003-12-23 13:45:55 Help