docs: function pg_escape(val){
  	if (val === null)
  		return 'NULL';
  	var backslash = ~val.indexOf('\\');
  	var prefix = backslash ? 'E' : '';
  	val = val.replace(REG_ESCAPE_1, '\'\'').replace(REG_ESCAPE_2, '\\\\');
  	return prefix + '\'' + val + '\'';
  }