Escape the ' character when quoting and escaping postgress array strings