(1 row)
select * from test_select('xuser', false);
-ERROR: PL/Proxy function public.test_select(2): bug: no result
+ERROR: PL/Proxy function public.test_select(2): Non-SETOF function requires 1 row from remote query, got 0
-- test errors
create function test_select_err(xuser text, tmp boolean)
returns integer as $$
else
{
func = compile_and_execute(fcinfo);
+ if (func->cur_cluster->ret_total != 1)
+ plproxy_error(func, "Non-SETOF function requires 1 row from remote query, got %d",
+ func->cur_cluster->ret_total);
ret = plproxy_result(func, fcinfo);
plproxy_clean_results(func->cur_cluster);
}