Postgresql String Length Function In Javascript