gset_05.diff
text/x-patch
Filename: gset_05.diff
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | 15 | 5 |
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 <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=> SELECT 'hello', 'wonderful', 'world!' \gset var1,,var3
+foo=> \echo :var1 :var3
+hello world!
+</programlisting>
</para>
</listitem>
</varlistentry>