Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Ghost
-
3
-
ghost-11.08.2021, ghost-22.09.2021
-
Needs Assessment
-
Bug Fix
-
-
Needs Assessment
Description
On the inventory endpoint, trusted facts can be queried in two ways
inventory[] { trusted.extensions.foo = "bar"}
|
But trusted is also just part of the factset
inventory[] { facts.trusted.extensions.foo = "bar" }
|
For the most part the queries function identically. But using trusted produces the filter
WHERE ((fs.stable||fs.volatile)->'trusted' @> '{"extensions": {"foo": "bar"}}'
|
and using facts.trusted produces the filter
WHERE ((fs.stable||fs.volatile) @> '{"trusted" {"extensions": {"foo": "bar"}}}'
|
the latter filter, using facts.trusted can use the index while the first, using trusted cannot because the index is on only (fs.stable || fs.volatile) so that must be what is on the left side of @> operator.