pg_escape_string
Name
pg_escape_string -- Escape a string for use in an SQL string constant
Synopsis
pg_escape_string string
Description
pg_escape_string
returns its argument with added
characters which makes it safe for use in single-quoted SQL string
constants. That is, it returns the string with all single quote marks
and backslash characters doubled.
For example, pg_escape_string {a'b\c} returns
the string a''b\\c.
Arguments
- string
The string to escape.
Return Value
The string argument, with added characters.
Notes
See also pg_quote.
This command uses the PostgreSQL
libpq
function PQescapeString
.