Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 405728f

Browse files
committed
Add some minimal documentation that the SQL standard requires parentheses
after ONLY.
1 parent bf21cdb commit 405728f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/src/sgml/ref/select.sgml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.116 2008/12/31 23:42:56 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.117 2009/01/12 14:06:20 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -1457,6 +1457,19 @@ SELECT distributors.* WHERE distributors.name = 'Westward';
14571457
</para>
14581458
</refsect2>
14591459

1460+
<refsect2>
1461+
<title><literal>ONLY</literal> and Parentheses</title>
1462+
1463+
<para>
1464+
The SQL standard requires parentheses around the table name
1465+
after <literal>ONLY</literal>, as in <literal>SELECT * FROM ONLY
1466+
(tab1), ONLY (tab2) WHERE ...</literal>. PostgreSQL supports that
1467+
as well, but the parentheses are optional. (This point applies
1468+
equally to all SQL commands supporting the <literal>ONLY</literal>
1469+
option.)
1470+
</para>
1471+
</refsect2>
1472+
14601473
<refsect2>
14611474
<title>Namespace Available to <literal>GROUP BY</literal> and <literal>ORDER BY</literal></title>
14621475

0 commit comments

Comments
 (0)