Postgresql Execute Function Python