Postgres Select Ids Into Array Methods Javascript Mdn Math