I have a table which has a column id with bigint type . I need to create function which will take a parameter bigint[] and in function I should check where id in (array)
CREATE OR REPLACE FUNCTION my_function(ids bigint[])
select * from table where id in ($1)
Function creates successfully , but when I call it
SELECT * FROM my_function(ARRAY [1,2,3,4]);
I get an error:
ERROR: operator does not exist: bigint = bigint[]
= ANYoperator, notin.