0
我有一個像函數調用沒有結果集
create or replace function getalltypes(name character varying(100))
returns setof docs as $BODY$
begin
perform c.contenttypename from conttype c;
end;
$BODY$ LANGUAGE PLPGSQL;
文檔PostgreSQL的功能是
select getalltypes('')
是越來越沒有結果顯示,我已經創建
create type docs as (contenttypename character varying(100))
類型。任何人都可以幫忙嗎?
您可能想要更改從contType c執行c.contenttypename;從contType c返回查詢c.contenttypename; –
@VaoTsun - 從contType c返回查詢c.contenttypename;在'c'處顯示錯誤。我改爲'返回查詢從conttype c選擇c.contenttypename;'然後它工作。謝謝 –