How To Create Function In Postgresql