diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-10-01 18:29:18 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-10-01 18:29:18 -0300 |
commit | 20047609d39cc4d30d6b266ed3a8b418b3ce5f78 (patch) | |
tree | c17f24d0a3267e241ce328b064e8262c2f8b70fb /doc/src | |
parent | 0ce67bce00717d8934b599ab4409e28b33c612ea (diff) |
Error out if SKIP LOCKED and WITH TIES are both specified
Both bugs #16676[1] and #17141[2] illustrate that the combination of
SKIP LOCKED and FETCH FIRST WITH TIES break expectations when it comes
to rows returned to other sessions accessing the same row. Since this
situation is detectable from the syntax and hard to fix otherwise,
forbid for now, with the potential to fix in the future.
[1] https://postgr.es/m/16676-fd62c3c835880da6@postgresql.org
[2] https://postgr.es/m/17141-913d78b9675aac8e@postgresql.org
Backpatch-through: 13, where WITH TIES was introduced
Author: David Christensen <david.christensen@crunchydata.com>
Discussion: https://postgr.es/m/CAOxo6XLPccCKru3xPMaYDpa+AXyPeWFs+SskrrL+HKwDjJnLhg@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index fa676b1698d..16bbab52c3e 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1515,7 +1515,8 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { The <literal>WITH TIES</literal> option is used to return any additional rows that tie for the last place in the result set according to the <literal>ORDER BY</literal> clause; <literal>ORDER BY</literal> - is mandatory in this case. + is mandatory in this case, and <literal>SKIP LOCKED</literal> is + not allowed. <literal>ROW</literal> and <literal>ROWS</literal> as well as <literal>FIRST</literal> and <literal>NEXT</literal> are noise words that don't influence the effects of these clauses. |