Postgres Function Select Into Array In Python Definition Range