Ronan Dunklau <rdunklau(at)gmail(dot)com> writes:
> Unfortunately for my use case, "too much" quoting can lead to errors in
> postgresql.
AFAIR, the only stuff that's unsafe to insert a backslash before
is ASCII letters. This is documented in the fine print discussing
regular expressions, btw.
regards, tom lane