From: | Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it> |
---|---|
To: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Fractions of seconds in timestamps |
Date: | 2012-04-25 09:43:50 |
Message-ID: | CAHjZ2x64jotU6+oiNXfhyFwr-s=ZisOfkGDDxOF3QcA7ZNKGUg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2012/4/25 Jasen Betts <jasen(at)xnet(dot)co(dot)nz>:
> On 2012-04-25, Valentin Militaru <valentin(dot)militaru(at)telcor(dot)ro> wrote:
>> This is a multi-part message in MIME format.
>> --------------050404030901030607030308
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>> Content-Transfer-Encoding: 7bit
>>
>> What about using
>>
>> WHERE f BETWEEN '2012-04-23 00:00:00' AND '2012-04-24 00:00:00'?
>>
>
> that could match the first microsecond of 2012-04-24
> otherwise not a prolem :)
>
> another option is BETWEEN '2012-04-23 00:00:00' AND '2012-04-23 23:59:60'
>
> or even BETWEEN '2012-04-23 00:00:00' AND '2012-04-23 23:59:60.999999'
>
> these are reliant on documented behaviours, but documented
> inosyncratic behaviours, behaviours that could potentially be improved.
> such that it woulkd no longer be reliable.
>
>>> you have to do it the long way
>>>
>>> f>= '2012-04-23 00:00:00' AND f< '2012-04-24 00:00:00'
>>>
>
> this way is mathematically correct and relies on standard guaranteed
> behaviours only.
>
> --
> ⚂⚃ 100% natural
Correct Jasen!
In my opinion the use of BETWEEN (as it is currently defined) makes
very little sense (if any) at least for time stamps.
What I've seen so far with time periods are always defined as either
"[...)" or "(..]".
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Tanzer | 2012-04-25 10:57:06 | PHP SQL Color Syntax that is Postgresql & GPL3 Compatible? |
Previous Message | Toby Corkindale | 2012-04-25 09:42:39 | Re: Bug? Query plans / EXPLAIN using gigabytes of memory |