diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 3693a5a..c4ac674 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1483,8 +1483,8 @@ testdb=&gt;
         way. Use <command>\i</command> for that.) This means that
         if the query ends with (or contains) a semicolon, it is
         immediately executed. Otherwise it will merely wait in the
-        query buffer; type semicolon, <literal>\g</> or <literal>\gset</literal> to send it, or
-        <literal>\r</> to cancel.
+        query buffer; type semicolon, <literal>\g</> or
+        <literal>\gset</literal> to send it, or <literal>\r</> to cancel.
         </para>
 
         <para>
@@ -1621,9 +1621,19 @@ Tue Oct 26 21:40:57 CEST 1999
 
         <listitem>
         <para>
-        Sends the current query input buffer to the server and stores
-        the query's target list a corresponding list of psql
-        variables.
+         Sends the current query input buffer to the server and stores the
+         query's output into corresponding <replaceable
+         class="parameter">variable</replaceable>.  The preceding query must
+         return only one row, and the number of variables must be same as the
+         number of elements in <command>SELECT</command> list.  If you don't
+         need any of items in <command>SELECT</command> list, you can omit
+         corresponding <replaceable class="parameter">variable</replaceable>.
+         Example:
+<programlisting>
+foo=&gt; SELECT 'hello', 'wonderful', 'world!' \gset var1,,var3 
+foo=&gt; \echo :var1 :var3
+hello world!
+</programlisting>
         </para>
         </listitem>
       </varlistentry>
