Hi all,
I'm using PostgreSQL 13.
I have a table:
CREATE TABLE test(docid integer, jsonb attrs);
So, attrs contains data like
...
"dates": ["2019-10-02", "2018-02-03"]
...
So, I want to SELECT all docids, which dates in range:
SELECT attrs FROM document_resinfo WHERE attrs @? '$.dates[*].datetime() ? (@ >= "2020-10-02".datetime())';
How can I create index on attrs field to query docids with other date? Thanks.
--
Best regards, Dmitry Voronin