I have this function:
create or replace function insert_aereo( aereo_type[] ) returns text as $$
begin
return 'ok';
end
$$ language plpgsql;
and this is the parameter type that I created:
create type aereo_type as (codice int, modello varchar, marca varchar);
Then I call my function:
select insert_aereo('{123, "ciao", "pippo"}');
but I get this error:
ERROR: function insert_aereo(unknown) is not unique at character 8 HINT: Could not choose a best candidate function. You might need to add explicit type casts. STATEMENT: select insert_aereo('{123, "ciao", "pippo"}'); ERROR: function insert_aereo(unknown) is not unique LINE 1: select insert_aereo('{123, "ciao", "pippo"}'); ^ HINT: Could not choose a best candidate function. You might need to add explicit type casts.
How can I fix it? What am I doing wrong?