Postgresql String Split Function Javascript