I'm trying to find the documentation of a complete list of escape sequences for string data types in Postgresql. So for example, if you need to escape a quote character inside of a quoted string, you would use \". Different DBMSs use different jargon, so I'm having a hard time finding what to search for.
I found this, but it doesn't look exhaustive to me. In this link, search for "The following special backslash sequences are recognized by COPY FROM".
http://www.postgresql.org/docs/9.5/static/sql-copy.html
EDIT:
I knew it wasn't exhaustive. See the \\ character here:
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html
Then look at "4.1.2.2. String Constants with C-style Escapes" in this link. Also read what's written in CAUTION. This is making me humble, and I hope it is for others.
http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html
"does not need to be "escaped" in a SQL string literal. The only character that needs escaping in SQL is the single quote itself and that is escaped by doubling it.'Arthur''s House'. But the escape sequences for CSV input files used by thecopycommand have nothing to do with the syntax for SQL string literals.copyor for SQL literals?