Postgresql Create Function Examples R