Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5932915

Browse files
committed
Add a specific example of parenthesizing when extracting a field of a
composite column. Might help cut down on future questions...
1 parentdea81a6 commit5932915

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎doc/src/sgml/syntax.sgml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.125 2008/10/29 14:35:04 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.126 2008/12/09 20:52:03 tgl Exp $ -->
22

33
<chapter id="sql-syntax">
44
<title>SQL Syntax</title>
@@ -1387,7 +1387,18 @@ $1.somecolumn
13871387
</programlisting>
13881388

13891389
(Thus, a qualified column reference is actually just a special case
1390-
of the field selection syntax.)
1390+
of the field selection syntax.) An important special case is
1391+
extracting a field from a table column that is of a composite type:
1392+
1393+
<programlisting>
1394+
(compositecol).somefield
1395+
(mytable.compositecol).somefield
1396+
</programlisting>
1397+
1398+
The parentheses are required here to show that
1399+
<structfield>compositecol</> is a column name not a table name,
1400+
or that <structname>mytable</> is a table name not a schema name
1401+
in the second case.
13911402
</para>
13921403
</sect2>
13931404

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp