| 3985 | } |
| 3986 | |
| 3987 | size_t |
| 3988 | PQescapeStringConn(PGconn *conn, |
| 3989 | char *to, const char *from, size_t length, |
| 3990 | int *error) |
| 3991 | { |
| 3992 | if (!conn) |
| 3993 | { |
| 3994 | /* force empty-string result */ |
| 3995 | *to = '\0'; |
| 3996 | if (error) |
| 3997 | *error = 1; |
| 3998 | return 0; |
| 3999 | } |
| 4000 | |
| 4001 | resetPQExpBuffer(&conn->errorMessage); |
| 4002 | |
| 4003 | return PQescapeStringInternal(conn, to, from, length, error, |
| 4004 | conn->client_encoding, |
| 4005 | conn->std_strings); |
| 4006 | } |
| 4007 | |
| 4008 | size_t |
| 4009 | PQescapeString(char *to, const char *from, size_t length) |