I'm trying to convert a JSON integer array to a postgres array for doing a WHERE clause, but I can't get it right. Tried casting to the array and to the whole subquery but I keep getting:
"LINE 1: select id from story where id in (SELECT ARRAY(SELECT jsonb_...
No operator matches the given name and argument types. You might need to add explicit type casts."
my query:
SELECT id FROM story WHERE id IN (SELECT ARRAY(SELECT jsonb_array_elements('[1000]'))::int[]);
Could please someone help? Thanks!