Postgres Select Function In Python Example