pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Francisco Olarte <folarte@peoplecall.com>
Cc: Chuck Martin <clmartin@theombudsman.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Query not producing expected result
Date: Wed, 1 May 2019 11:04:44 -0700
Message-ID: <f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com> (raw)
In-Reply-To: <CA+bJJbyUxwWux3NQKiebsdbzpb_52M16Ho1oxm5zM6cdUm-tSw@mail.gmail.com>
References: <CAFw6=U2AisghJ2cOPOWopmk3NVVJ-WcSTNM+6K_-kQVBGxzMaA@mail.gmail.com>
	<25696.1556728884@sss.pgh.pa.us>
	<CAFw6=U3wV3NDt3c8sqHiE4QLRufy3s8d21BaLdkRLpPNUEh9ww@mail.gmail.com>
	<CA+bJJbyXzdBL7198YsJTjyWjtrZbrkfiw9w=cxERhQnZ=j8bww@mail.gmail.com>
	<f677424a-5902-63f2-608d-8b86412375c9@aklaver.com>
	<CAFw6=U3iPjbDykpPeuG09RHTrdhdUN-OMHksxmVwukzuL3dbZw@mail.gmail.com>
	<27a5b2e7-9e84-ab43-68a3-d5009e5815a0@aklaver.com>
	<CA+bJJbyUxwWux3NQKiebsdbzpb_52M16Ho1oxm5zM6cdUm-tSw@mail.gmail.com>

On 5/1/19 10:58 AM, Francisco Olarte wrote:
> Adrian..
> 
> On Wed, May 1, 2019 at 7:50 PM Adrian Klaver <adrian.klaver@aklaver.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.klaver@aklaver.com





view thread (22+ messages)  latest in thread

Message-ID: <f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com>
Permalink:  ../f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com/
Also on:    postgresql.org/message-id/f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, folarte@peoplecall.com, clmartin@theombudsman.com
  Subject: Re: Query not producing expected result
  In-Reply-To: <f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com>
  References: <CAFw6=U2AisghJ2cOPOWopmk3NVVJ-WcSTNM+6K_-kQVBGxzMaA@mail.gmail.com> <25696.1556728884@sss.pgh.pa.us> <CAFw6=U3wV3NDt3c8sqHiE4QLRufy3s8d21BaLdkRLpPNUEh9ww@mail.gmail.com> <CA+bJJbyXzdBL7198YsJTjyWjtrZbrkfiw9w=cxERhQnZ=j8bww@mail.gmail.com> <f677424a-5902-63f2-608d-8b86412375c9@aklaver.com> <CAFw6=U3iPjbDykpPeuG09RHTrdhdUN-OMHksxmVwukzuL3dbZw@mail.gmail.com> <27a5b2e7-9e84-ab43-68a3-d5009e5815a0@aklaver.com> <CA+bJJbyUxwWux3NQKiebsdbzpb_52M16Ho1oxm5zM6cdUm-tSw@mail.gmail.com> <f489e6d5-8eba-fcf7-ec9e-17a14efca57c@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox