stac-utils/pgstac

Exception with a legitimate SQL query

drnextgis opened this issue · 0 comments

Disabling additionalProperties results in the following query triggering an exception::

postgis=# SELECT search('{"filter": {"and": [{"t_after": [{"property": "datetime"}, "2020-11-11T00:00:00"]}, {"t_before": [{"property": "datetime"}, "2022-11-11T00:00:00"]}]}}');
ERROR:  Term <NULL> is not found in queryables.
CONTEXT:  PL/pgSQL function cql2_query(jsonb,text) line 110 at RAISE
PL/pgSQL function stac_search_to_where(jsonb) line 60 at assignment
PL/pgSQL function search_query(jsonb,boolean,jsonb) line 18 at assignment
PL/pgSQL function search(jsonb) line 39 at assignment