the postgres doc says that i can use ?& to check if a JSONB object's keys contains all elements in an array. is there something for me to check if all keys in an JSONB objects are contained by a given array?
so doing a query like
select my_jsonb_column
from my_table
where my_jsonb_column *contained_by* array['a', 'b', 'c'];
would yield results as the following where the keys are a subset of the given array.
{'a': 1, 'b': 2}
{'a': 1, 'b': 2, 'c': 3}
array(select jsonb_object_keys(my_jsonb_column))and Array Functions and Operatorsselectinside thearrayfunction. apparently it doesn't work without it. would be great if you can point me to some resources for an explanation. thanks!array()here is not regular function but Array Constructor. IMO It is not necessary to have two separate forms of constructor for subquery and for SRF results.