I have a requirement to obtain the rows which match given tags key and value case-insensitively.
Here: Key search should be case insensitive and values may be String or Array of String.
Right Now, I am using following Query :
Database : Postgres
select * from my_table_name where jsonb_contains(lower(to_jsonb(jsonb_extract_path(tags,'key1'))::TEXT)::jsonb, to_jsonb('"value1"'::jsonb))
But it is searching key as case sensitive manner.
above query should return all records having key is (key1,Key1,KEY1) and value is ‘Value1’
Can some one help me on this?