Postgresql Creating Functions In Python