Re: Query not producing expected result

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>
Cc: Chuck Martin <clmartin(at)theombudsman(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query not producing expected result
Date: 2019-05-01 18:04:44
Message-ID: f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/1/19 10:58 AM, Francisco Olarte wrote:
> Adrian..
>
> On Wed, May 1, 2019 at 7:50 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>> I should have made it clearer, my suggestion was mostly directed at
>> Franciso's example.
> ...
>> For this sort of thing, I have found range types to be a time and sanity
>> saver. Just throwing it out there.
>
> I've had problems with the functions, being used to the [start,end)
> notation on paper. I'll look at them again.

You don't have to use the functions:

test_(postgres)# select dt_fld from dt_test where dt_fld <@
'[2019-02-01, 2019-03-01)'::daterange ;
dt_fld
------------
2019-02-03
2019-02-26

>
> But anyway, after so many years of not having intervals and operators,
> I read "$start<= $val and $val < $end" as "$val in [$start,$end)", I
> think it shares brain paths with "for(;;)" parsing to "forever /
> loop". I would like to have the "$start <= $val < $end" which some
> language whose name I do not remember has, for complex $vals.
>
> Francisco Olarte.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2019-05-01 18:04:48 Re: Query not producing expected result
Previous Message Francisco Olarte 2019-05-01 17:58:53 Re: Query not producing expected result