Next from the stream of doc comments, someone points out that if you
read http://www.postgresql.org/docs/current/static/queries-values.html a
beginner may not understand just what " table alias list" means. If you
start at the beginning of the chapter it makes more sense, but it isn't
necessarily obvious even then.
Easiest fix is to demonstrate this by example, so that's what the
attached patch adds. There was an example of this approach in the full
documentation of VALUES already, but I felt that one was too complicated
for a tutorial section.
--
Greg Smith 2ndQuadrant US g...@2ndquadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml
index d7b0d73..cf477c7 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:
+<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>
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs