Postgresql Function Return Json Example Code