I have a function that I am using as a sproc. For the parameters, I have one which is the primary key of a record in a particular table. I would like to modify this function so that it takes an array of such keys but I am struggling to find any material that specifies how this is achieved (or whether it is even possible).
CREATE OR REPLACE FUNCTION create_funky(p_name character varying,
p_funky_ids funky.id%TYPE)
RETURNS integer AS ...
I would like the p_funky_ids
parameter to be an array of the type corresponding to the funky.id
column. I have obviously tried the following but Postgres was not amused:
CREATE OR REPLACE FUNCTION create_funky(p_name character varying,
p_funky_ids funky.id%TYPE[])
RETURNS integer AS ...
Penny for your thoughts...