Postgresql Create Sql Function Example