Hi team,
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:
This is how I called this script:
Then I got the following error:
ERROR: function insert_busshour s(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.
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:
Code:
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';
Code:
select insert_busshours (5,'tues','{10,23}');
ERROR: function insert_busshour s(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.
Comment