select * from MyTable where
((JsonBField->>'status'='descartada' and
To_Date(JsonBField->'descartada'->>'data','yyyy-mm-dd') > Current_Date) or
(JsonBField->>'status'='contrato' and
To_Date(JsonBField->'contrato'->>'data','yyyy-mm-dd') > Current_Date-7) or
(JsonBField->>'status'='naoatribuido'));
Considering this table has a million records, I would like to use a proper
index, but how can I use an index when using operator >.
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html