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=>
way. Use \i 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, \g> or \gset to send it, or
- \r> to cancel.
+ query buffer; type semicolon, \g> or
+ \gset to send it, or \r> to cancel.
@@ -1621,9 +1621,19 @@ Tue Oct 26 21:40:57 CEST 1999
- 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 variable. The preceding query must
+ return only one row, and the number of variables must be same as the
+ number of elements in SELECT list. If you don't
+ need any of items in SELECT list, you can omit
+ corresponding variable.
+ Example:
+
+foo=> SELECT 'hello', 'wonderful', 'world!' \gset var1,,var3
+foo=> \echo :var1 :var3
+hello world!
+