2010-09-11 4 views
2

J'ai cette fonction:erreur de requête tout en travaillant avec des réseaux PL/pgSQL

create or replace function insert_aereo(aereo_type[]) returns text as $$ 
begin 
    return 'ok'; 
end 
$$ language plpgsql; 

et c'est le type de paramètre que j'ai créé:

create type aereo_type as (codice int, modello varchar, marca varchar); 

Alors je l'appelle ma fonction:

select insert_aereo('{123, "ciao", "pippo"}'); 

mais j'obtiens cette erreur:

 
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. 

Comment puis-je résoudre ce problème? Qu'est-ce que je fais mal?

Répondre

Questions connexes