PQescapeString is an older, deprecated version of PQescapeStringConn; the difference is that it does not take conn or error parameters.
It cannot adjust its behavior depending on the connection properties (such as character encoding) and therefore it might give the wrong results.