Postgres Execute Function In Python