Bruce Momjian <> writes:
> The attached patch fixes the warning you received by adding E'' strings
> to the \copy arguments, and adds it for the other backslash commands
> like \d.

Further comment on this: I don't think we want all these places
individually making this sort of decision.  What they should all be
doing is using appendStringLiteralConn to generate the properly-quoted
literal.  (I fixed this already in describe.c, but not in those other

Once we've got that done, we could argue about whether appendStringLiteral
ought to prepend an E to silence escape_string_warning.  I'd still vote
no, but at least it would be a single place to change and not N of 'em.
What's more, each place that is generating a variable literal without
using appendStringLiteral or PQescapeString is at least potentially
vulnerable to encoding issues, and so we should probably convert them

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to