From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: updatable cursors and ORDER BY |
Date: | 2018-05-28 17:17:16 |
Message-ID: | 20180528171716.GA5306@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, May 10, 2018 at 12:55:23PM -0400, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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.
I have done as you suggested and just used the first part; patch
attached and backpatched.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Attachment | Content-Type | Size |
---|---|---|
declare.diff | text/x-diff | 977 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2018-05-28 17:48:58 | Re: Postgres upgrade trouble |
Previous Message | Tom Lane | 2018-05-27 03:08:47 | Re: \i and \ir separated by \if now... |