Re: Strange behaviors with ranges - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Strange behaviors with ranges
Date
Msg-id 41e2ee2e-3f27-4f2c-86b0-8252411fdc75@aklaver.com
Whole thread Raw
In response to Re: Strange behaviors with ranges  (Jean-Christophe BOGGIO <postgresql@thefreecat.org>)
Responses Re: Strange behaviors with ranges
List pgsql-general

On 8/27/24 11:13 AM, Jean-Christophe BOGGIO wrote:
> Le 27/08/2024 à 19:51, Torsten Förtsch a écrit :
>> I guess this query comes back non-empty:
>>
>> SELECT * FROM paliers JOIN tmp_limitcontrats USING(idcontrat) WHERE 
>> qtep1 >= qtep2
> 
> Yes, it is empty if I keep tmp_limitcontrats to idcontrat=1003
> 
> Otherwise, you are right, there are irregular data but not that I'm 
> concerned with in that particular case.
> 

?:
SELECT numrange( qtep1+1   , qtep2,  '[]') AS rangep FROM paliers JOIN 
tmp_limitcontrats USING(idcontrat) where qtep1+1 < qtep2

-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Jean-Christophe BOGGIO
Date:
Subject: Re: Strange behaviors with ranges
Next
From: Adrian Klaver
Date:
Subject: Re: Strange behaviors with ranges