aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-01-31 16:37:25 -0500
committerBruce Momjian <bruce@momjian.us>2014-01-31 16:37:25 -0500
commit8824b38909b28c801456ade7a63ff67e3795ed1d (patch)
tree78bfb91da36d871c939ee80834d8e0a060f45a59 /doc/src
parentfc4ffba9685809474a1cb9aa7bd122f62f0ee2e5 (diff)
downloadpostgresql-8824b38909b28c801456ade7a63ff67e3795ed1d.tar.gz
postgresql-8824b38909b28c801456ade7a63ff67e3795ed1d.zip
docs: specify FOR UPDATE/SHARE incompatibilities
Document that FOR UPDATE/SHARE are incompatible with GROUP BY, DISTINCT, HAVING and window functions. Michael Paquier
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/select.sgml24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index f9f83f34f70..9a468b98c0a 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -654,6 +654,12 @@ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...]
the grouped columns (or a subset thereof) are the primary key of
the table containing the ungrouped column.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>GROUP BY</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-HAVING">
@@ -690,6 +696,12 @@ HAVING <replaceable class="parameter">condition</replaceable>
within aggregate functions. Such a query will emit a single row if the
<literal>HAVING</literal> condition is true, zero rows if it is not true.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>HAVING</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-WINDOW">
@@ -825,6 +837,12 @@ UNBOUNDED FOLLOWING
</para>
<para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>WINDOW</literal>.
+ </para>
+
+ <para>
Window functions are described in detail in
<xref linkend="tutorial-window">,
<xref linkend="syntax-window-functions">, and
@@ -920,6 +938,12 @@ SELECT DISTINCT ON (location) location, time, report
will normally contain additional expression(s) that determine the
desired precedence of rows within each <literal>DISTINCT ON</> group.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>DISTINCT</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-UNION">