diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 7180fedd65..bba3cf05b0 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -461,6 +461,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
         the list of executed scripts.
         An optional integer weight after <literal>@</literal> allows to adjust the
         probability of drawing the test.
+        If the filename includes a <literal>@</literal> character, append a weight so
+        that there is no ambiguity: <literal>filen@me@1</literal>.
         See below for details.
        </para>
       </listitem>
