How To Create A Function In Postgresql