2
我有這樣的功能:查詢錯誤,同時用PL/pgSQL的陣列工作
create or replace function insert_aereo(aereo_type[]) returns text as $$
begin
return 'ok';
end
$$ language plpgsql;
,這是我創建的參數類型:
create type aereo_type as (codice int, modello varchar, marca varchar);
然後,我打電話給我的功能:
select insert_aereo('{123, "ciao", "pippo"}');
但我得到這個錯誤:
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.
我該如何解決?我究竟做錯了什麼?