Re: updatable cursors and ORDER BY - Mailing list pgsql-docs

From Tom Lane
Subject Re: updatable cursors and ORDER BY
Date
Msg-id 22649.1525971323@sss.pgh.pa.us
Whole thread Raw
In response to Re: updatable cursors and ORDER BY  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: updatable cursors and ORDER BY  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I think that last part isn't actually written down anywhere.  (It only
> states the converse.)  How about a clarification like this:

> @@ -271,7 +271,10 @@ <title id="sql-declare-notes-title">Notes</title>
>       and not use grouping or <literal>ORDER BY</literal>).  Cursors
>       that are not simply updatable might work, or might not, depending on plan
>       choice details; so in the worst case, an application might work in testing
> -     and then fail in production.
> +     and then fail in production.  If <literal>FOR UPDATE</literal> is
> +     specified, then the cursor is guaranteed to be updatable, or the
> +     <command>DECLARE</command> command will error if an updatable cursor
> +     cannot be created for the supplied query.
>      </para>

OK by me, except we don't usually use "error" as a verb.  Either "fail"
or "throw an error" would read better IMO.  Or you could just stop with
"guaranteed to be updatable"; I don't think the rest adds much.

            regards, tom lane


pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: updatable cursors and ORDER BY
Next
From: Eugene Wang
Date:
Subject: Re: Mistakes between an example and its description