Re: Daterange question - Mailing list pgsql-general

From Andreas Joseph Krogh
Subject Re: Daterange question
Date
Msg-id VisenaEmail.4.77e0ca2a10ddb492.18d257d4a76@origo-test01.app.internal.visena.net
Whole thread Raw
In response to Re: Daterange question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
På lørdag 20. januar 2024 kl. 06:35:07, skrev Tom Lane <tgl@sss.pgh.pa.us>:
[…]
Well, we can definitively state that the NOT makes this unindexable.
You need a WHERE clause that looks like
indexed-column indexable-operator pseudo-constant
which this isn't, nor does << have a negator operator that could
allow the NOT to be simplified out.

Wouldn't
drange && daterange(CURRENT_DATE, NULL, '[)')
serve the purpose?  That should be indexable.

regards, tom lane

Yes it will, thanks.

 

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Daterange question
Next
From: Chris Angelico
Date:
Subject: Logical replication claims to work, not working - new tables