Re: BETWEEN not matching on timestamp value

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: BETWEEN not matching on timestamp value
Date: 2009-06-30 17:58:55
Message-ID: dcc563d10906301058x506c4b48md55b277426f6b193@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 30, 2009 at 11:51 AM, James B. Byrne<byrnejb(at)harte-lyne(dot)ca> wrote:
>
> On Tue, June 30, 2009 13:24, Tom Lane wrote:
>
>>
>> No, it's complaining that the constant is out of range --- it's
>> failing long before it's tried to do any actual BETWEEN comparisons.
>> Surely you meant something more like 2008-08-09?
>>
>>                       regards, tom lane
>>
>
> The column is a timestamp value.  I expected any time on any given
> date to fall between the start and end of that day so the
> hh:mm:ss:hh portion does not leap out at me as something that should
> cause a problem.  Should  it?

20080809-01-01 00:00:00

But that timestamp is for the year 20080809, which is pretty far off
in the future. I think that's the problem.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-06-30 18:07:40 Re: BETWEEN not matching on timestamp value
Previous Message James B. Byrne 2009-06-30 17:51:36 Re: BETWEEN not matching on timestamp value