Add a specific example of parenthesizing when extracting a field of a
authorTom Lane
Tue, 9 Dec 2008 20:52:03 +0000 (20:52 +0000)
committerTom Lane
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 90aa3b6c9b4c2073052875e04cc0f71107b0c84a..cca44794340b1fb5ac2b4586b03cbd23429265d0 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  SQL Syntax
@@ -1387,7 +1387,18 @@ $1.somecolumn
 
 
     (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:
+
+
+(compositecol).somefield
+(mytable.compositecol).somefield
+
+
+    The parentheses are required here to show that
+    compositecol is a column name not a table name,
+    or that mytable is a table name not a schema name
+    in the second case.