I have a simple procedure that returns first account record from table. It is working in psql
but not working when i expose it as an API in Vahana. Below is the procedure.
create or replace function public.func_accounts(
x_account numeric)
returns public.account
LANGUAGE plpgsql as
$$
DECLARE
first_account public.account;
begin
SELECT * INTO first_account
FROM public.account
WHERE accountno=x_account LIMIT 1;
RETURN first_account;
end
$$;