So I have a sybase stored procedure and I'm moving it in Postgres 9.5 but I can't seem to make a portion of it working. In the procedure there is an if clause that at the end has return 0 like below: In Sybase:
if @param = true begin
select col1, col2
from table
where <condition>
return 0
end
How can I use the return status in a Postgres function using plpgsql language?
Any help appreciated.