On Wednesday, October 31, 2018, PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> A simple table elaborating on
> the escapes for each special character would be incredibly helpful at
> determining how to translate those escapes for cleaning strings prior to
> insertion so those of us using postgresql can quickly write cleaning
> functions for data.
>
Translating escapes and writing cleaning functions should be a rare need
unless you are writing driver-level code. Applications should avoid caring
about either by avoiding dynamic sql altogether or using quote_* functions
or the format function.
David J.