pg_escape_string() escapes
string for text/char datatype. It returns escaped string for
PostgreSQL. Use of this function is recommended instead of
addslashes().
注: This function requires PostgreSQL 7.2 or later.
See also pg_escape_bytea()