Postgresql Create Function Return Json String