>>> On Wed, Apr 25, 2007 at 12:42 AM, in message <[EMAIL PROTECTED]>,
Tom Lane <[EMAIL PROTECTED]> wrote:
> "Lee Chua" <[EMAIL PROTECTED]> writes:
>> When we select and order by time we get 00:00:00 as the latest time of the
>> day.
>
> Really? It works as expected for me:
>
> regression=# create table foo(f1 time);
> CREATE TABLE
> regression=# insert into foo values ('1:00:00'),('2:00:00'),('0:00:00'),
> regression- # ('23:00:00'), ('23:59:59');
> INSERT 0 5
> regression=# select * from foo order by f1;
> f1
> ----------
> 00:00:00
> 01:00:00
> 02:00:00
> 23:00:00
> 23:59:59
> (5 rows)
I just wanted to point out that midnight is supported at both ends -- the start
of the day as 00:00:00, and the end of the day as 24:00:00. Perhaps the
application software is not distinguishing these?
Modifying Tom's example to insert one more row, you will see:
f1
----------
00:00:00
01:00:00
02:00:00
23:00:00
23:25:59
24:00:00
(6 rows)
I know there are some who require this behavior. (I had to add it to a
database product years ago when it was used to develop an application for fire
departments.)
-Kevin
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend