Postgres Execute Function Python Definition