Postgres Update Value In Array Javascript Length Function