diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-16 17:34:28 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-16 17:34:28 +0000 |
| commit | 18004101acb98d8fefe7dda1c9f010cceff83b6d (patch) | |
| tree | 2c9436b642ca63f2b831ba4e3cfd16d34436e6a2 /doc/src/sgml/plpgsql.sgml | |
| parent | 30f272a79b248fea1f25d63a3648d2660d370a69 (diff) | |
| download | postgresql-18004101acb98d8fefe7dda1c9f010cceff83b6d.tar.gz | |
Modify UPDATE/DELETE WHERE CURRENT OF to use the FOR UPDATE infrastructure to
locate the target row, if the cursor was declared with FOR UPDATE or FOR
SHARE. This approach is more flexible and reliable than digging through the
plan tree; for instance it can cope with join cursors. But we still provide
the old code for use with non-FOR-UPDATE cursors. Per gripe from Robert Haas.
Diffstat (limited to 'doc/src/sgml/plpgsql.sgml')
| -rw-r--r-- | doc/src/sgml/plpgsql.sgml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 2a0894bbf2..b8dfe01f5c 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.135 2008/10/28 22:02:05 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.136 2008/11/16 17:34:28 tgl Exp $ --> <chapter id="plpgsql"> <title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title> @@ -2674,9 +2674,10 @@ DELETE FROM <replaceable>table</replaceable> WHERE CURRENT OF <replaceable>curso <para> When a cursor is positioned on a table row, that row can be updated - or deleted using the cursor to identify the row. Note that this - only works for simple (non-join, non-grouping) cursor queries. - For additional information see the + or deleted using the cursor to identify the row. There are + restrictions on what the cursor's query can be (in particular, + no grouping) and it's best to use <literal>FOR UPDATE</> in the + cursor. For additional information see the <xref linkend="sql-declare" endterm="sql-declare-title"> reference page. </para> |
