Postgres Function Select Into Array In Python