fix pg single quote escape issue