I'm wondering how to correctly create an index that would index the keys of a JSONB column that has the following shape:
{
"perm1": true,
"perm2": false,
"perm3": true
}
Basically I'd like the lookup of perm1, perm2 and perm3 to be the keys to reference. I don't know the values of the keys so I can't using the regular create index. I did find this as a suggestion:
CREATE INDEX idx_visitors ON visitors USING GIN (jsonb jsonb_path_value_ops);
Is there a more appropriate way of creating asserting this index?