diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 88d6c22a910..30d2710fd2e 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1,5 +1,5 @@
@@ -88,8 +88,8 @@ PostgreSQL documentation
or a single backslash command. Thus you cannot mix
SQL and psql
meta-commands. To achieve that, you could pipe the string into
- psql, like this: echo "\x \\
- select * from foo;" | psql.
+ psql, like this: echo -e
+ "\\x\nSELECT * FROM foo;" | psql.
If the command string contains multiple SQL commands, they are