Postgresql User Defined Function Examples