Add a specific example of parenthesizing when extracting a field of a
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Dec 2008 20:52:03 +0000 (20:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Dec 2008 20:52:03 +0000 (20:52 +0000)
composite column.  Might help cut down on future questions...

doc/src/sgml/syntax.sgml

index 3ce5909d8cff20d06025b886de717c98e9740755..ac4fd783626929ebc7c87a055662bda8a9bb01be 100644 (file)
@@ -1387,7 +1387,18 @@ $1.somecolumn
 </programlisting>
 
     (Thus, a qualified column reference is actually just a special case
-    of the field selection syntax.)
+    of the field selection syntax.)  An important special case is
+    extracting a field from a table column that is of a composite type:
+
+<programlisting>
+(compositecol).somefield
+(mytable.compositecol).somefield
+</programlisting>
+
+    The parentheses are required here to show that
+    <structfield>compositecol</> is a column name not a table name,
+    or that <structname>mytable</> is a table name not a schema name
+    in the second case.
    </para>
   </sect2>