Re: Strange? BETWEEN behaviour.

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: William Ivanski <william(dot)ivanski(at)gmail(dot)com>
Cc: Bjørn T Johansen <btj(at)havleik(dot)no>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Strange? BETWEEN behaviour.
Date: 2016-10-20 13:02:52
Message-ID: CA+bJJbzeiBE30jDjM92H5iLErJrADmEgO7T0+gGL-rHoepxzPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bottom quoting makes it difficult to reply properly, so reformated a bit:

On Thu, Oct 20, 2016 at 2:02 PM, William Ivanski
<william(dot)ivanski(at)gmail(dot)com> wrote:
> Em qui, 20 de out de 2016 às 09:52, Bjørn T Johansen <btj(at)havleik(dot)no>
> escreveu:
>> date is of type timestamp.
> select * from table where date = '2016/10/20'::date

I think is the other way round ( date::date = '2016/10/20' ).

To me it seems yours will do:
date = '2016/10/20'::date::timestamp ( = 2016/10/20 00:00:00 )
( widening conversion )

Francisco Olarte.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Арсений Нестюк 2016-10-20 13:07:54 Showing matrix with single query
Previous Message vinny 2016-10-20 12:37:40 Re: Strange? BETWEEN behaviour.