Re: BUG #3252: Select Order by time - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #3252: Select Order by time
Date
Msg-id 462F7075.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: BUG #3252: Select Order by time  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #3252: Select Order by time
List pgsql-bugs
>>> On Wed, Apr 25, 2007 at 12:42 AM, in message <14184.1177479755@sss.pgh.=
pa.us>,
Tom Lane <tgl@sss.pgh.pa.us> wrote:=20
> "Lee Chua" <leehchua@bensecurity.com.au> writes:
>> When we select and order by time we get 00:00:00 as the latest time of t=
he
>> day.
>=20
> Really?  It works as expected for me:
>=20
> regression=3D# create table foo(f1 time);
> CREATE TABLE
> regression=3D# insert into foo values ('1:00:00'),('2:00:00'),('0:00:00'),
> regression- #  ('23:00:00'), ('23:59:59');
> INSERT 0 5
> regression=3D# select * from foo order by f1;
>     f1=20=20=20=20
> ----------
>  00:00:00
>  01:00:00
>  02:00:00
>  23:00:00
>  23:59:59
> (5 rows)
=20
I just wanted to point out that midnight is supported at both ends -- the s=
tart of the day as 00:00:00, and the end of the day as 24:00:00.  Perhaps t=
he application software is not distinguishing these?
=20
Modifying Tom's example to insert one more row, you will see:
=20
    f1
----------
 00:00:00
 01:00:00
 02:00:00
 23:00:00
 23:25:59
 24:00:00
(6 rows)
=20
I know there are some who require this behavior.  (I had to add it to a dat=
abase product years ago when it was used to develop an application for fire=
 departments.)
=20
-Kevin
=20

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Next
From: Tom Lane
Date:
Subject: Re: pg_dump doesn't properly honor -O for sequences