I am creating a function that would accept an array of integer as its parameter. I have a table where one of its column is declared as an array. This is an excerpt from the script that I was creating:
Expand|Select|Wrap|Line Numbers
- create or replace function insert_busshours(bigint, varchar, integer[]) returns integer as
- '
- begin
- insert into businesshours values ($1,$2,$3);
- return ''0'';
- end;
- '
- language 'plpgsql';
Expand|Select|Wrap|Line Numbers
- select insert_busshours (5,'tues','{10,23}');
ERROR: function insert_busshours(integer, "unknown", "unknown") is not unique
HINT: Could not choose a best candidate function. You may need to add explicit type casts.
Can someone help me point out where the problem is? Thanks for your answers as always.