I have a jsonb parameter to my plsql procedure with data {1=2,2=3}. My Table contains the following data,
att_name |att_key |att_value
abcd |1 |2
bcde |2 |3
efgh |1 |3
I want to filter out the data where (att_key = 1 and att_value = 2) or (att_key = 2 and att_value = 3) which should be dynamically generated based on the jsonb input.The output will contain abcd and bcde only. Is there any way to create this query dynamically in postgresql.