Postgres Select Ids Into Array Interview Question