summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-06-06 21:03:04 -0400
committerPeter Eisentraut <peter_e@gmx.net>2013-06-06 21:03:04 -0400
commit58617e4dc131561f4b6ba492d6a404b05bd0b968 (patch)
tree60161067cd71d04da61f615be499544ad05c0a3e /doc/src
parentf73cb5567c2e27d9a02c7ddba9da8d8557cf08dd (diff)
doc: Clarify description of VALUES command
Greg Smith
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/queries.sgml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml
index d7b0d731b9d..c32c8576518 100644
--- a/doc/src/sgml/queries.sgml
+++ b/doc/src/sgml/queries.sgml
@@ -1609,7 +1609,16 @@ SELECT 3, 'three';
<literal>VALUES</> table. The column names are not specified by the
SQL standard and different database systems do it differently, so
it's usually better to override the default names with a table alias
- list.
+ list, like this:
+<programlisting>
+=> SELECT * FROM (VALUES (1, 'one'), (2, 'two'), (3, 'three')) AS t (num,letter);
+ num | letter
+-----+--------
+ 1 | one
+ 2 | two
+ 3 | three
+(3 rows)
+</programlisting>
</para>
<para>