Re: Time problem again? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Time problem again?
Date
Msg-id 200309300942.39576.dev@archonet.com
Whole thread Raw
In response to Re: Time problem again?  (Bjørn T Johansen <btj@havleik.no>)
Responses Re: Time problem again?
List pgsql-general
On Tuesday 30 September 2003 09:00, Bjørn T Johansen wrote:
> Why can't you just take my word for it, this is the way it should be
> sorted....

I'm happy to take your word, but until I can figure out what rules you're
using I can't suggest anything. You clearly know what you want, but I can't
get to grips with precisely what that is.

> The reason I know this, is because the timespan, as I have mention
> before, from first record to last record is always less than 12 hours.
> i.e the span from 0200 to 2200 is 20 hours, i.e. 2200 comes before 0200!

Ah - you said 24 hours originally, which means that all the examples we've
looked at were valid. Apologies if I missed the 12-hour bit.

So - your rule is something like:

For some block of times...
  IF max(my_time) - min(my_time) > 12 hours
  THEN sort "through midnight"
  ELSE sort "naturally"

Which is what Tom said (I was wondering where he got his 12 hours from).
Have I got that right?

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Bjørn T Johansen
Date:
Subject: Re: Time problem again?
Next
From: "Angel Todorov"
Date:
Subject: pg_hba.conf