diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-10-28 12:02:04 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-10-28 12:02:04 -0400 |
commit | 9cf12dfd4e9e5301d7f8cf48e1eead1626c42127 (patch) | |
tree | 12d57c9ead07c0adc287ea903cb428b5fc689b0a /doc/src | |
parent | 6c21105fb40adc22d31ba1b7caf104640347651c (diff) | |
download | postgresql-9cf12dfd4e9e5301d7f8cf48e1eead1626c42127.tar.gz postgresql-9cf12dfd4e9e5301d7f8cf48e1eead1626c42127.zip |
Clarify that ORDER BY/FOR UPDATE can't malfunction at higher iso levels.
Kevin Grittner
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 636435fe1d8..cc8cd48583a 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1281,7 +1281,8 @@ ROLLBACK TO s; <caution> <para> - It is possible for a <command>SELECT</> command using <literal>ORDER + It is possible for a <command>SELECT</> command running at the <literal>READ + COMMITTED</literal> transaction isolation level and using <literal>ORDER BY</literal> and <literal>FOR UPDATE/SHARE</literal> to return rows out of order. This is because <literal>ORDER BY</> is applied first. The command sorts the result, but might then block trying to obtain a lock @@ -1302,6 +1303,13 @@ SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss ORDER BY column1; only if concurrent updates of the ordering columns are expected and a strictly sorted result is required. </para> + + <para> + At the <literal>REPEATABLE READ</literal> or <literal>SERIALIZABLE</literal> + transaction isolation level this would cause a serialization failure (with + a <literal>SQLSTATE</literal> of <literal>'40001'</literal>), so there is + no possibility of receiving rows out of order under these isolation levels. + </para> </caution> </refsect2> |