I am using postgres from past few days and i came up with requirement which i am trying to find solution.
I am using postgres sql.
I have a Table which is like this
CREATE TABLE location (id location_Id, details jsonb);
INSERT INTO location (id,details)
VALUES (1,'[{"Slno" : 1, "value" : "Bangalore"},
{"Slno" : 2, "value" : "Delhi"}]');
INSERT INTO location (id,details)
VALUES (2,'[{"Slno" : 5, "value" : "Chennai"}]');
From the above queries you can see that a jsonb column with name details is present which has an array of json as value stored. The data is stored like this because of some requirement.
Here i want to create an index for the Slno property present in jsonb
column values.
Can someone help me out in finding solution for this as it would be very helpful.
Thanks