Thread

Commits

  1. Doc: minor improvement in pl/pgsql FETCH/MOVE documentation.

  1. small doc fix - using expressions in plpgsql FETCH command

    Pavel Stehule <pavel.stehule@gmail.com> — 2018-07-06T07:58:30Z

    Hi
    
    PLpgSQL FETCH documentation is has ref on SQL FETCH command. SQL FETCH
    allows only int constants as count. PLpgSQL allows any expressions. In this
    case documentation is not clear, and people can be messy - and apply SQL
    FETCH limits on PLpgSQL FETCH.
    
    https://stackoverflow.com/questions/51129336/pl-pgsql-move-with-variable-value/51169438?noredirect=1#comment89349088_51169438
    
    I propose some small enhancing
    
    diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
    index 5b2aac618e..b65cb11d00 100644
    --- a/doc/src/sgml/plpgsql.sgml
    +++ b/doc/src/sgml/plpgsql.sgml
    @@ -3250,7 +3250,8 @@ MOVE <optional> <replaceable>direction</replaceable>
    { FROM | IN } </optional> <
          as specifying <literal>NEXT</literal>.
          <replaceable>direction</replaceable> values that require moving
          backward are likely to fail unless the cursor was declared or opened
    -     with the <literal>SCROLL</literal> option.
    +     with the <literal>SCROLL</literal> option. The
    <replaceable>count</replaceable>
    +     can be any expressions with integer result or integer constant.
         </para>
    
         <para>
    
    Options, notes?
    
    Regards
    
    Pavel
    
  2. Re: small doc fix - using expressions in plpgsql FETCH command

    Tom Lane <tgl@sss.pgh.pa.us> — 2018-07-12T16:29:58Z

    Pavel Stehule <pavel.stehule@gmail.com> writes:
    > PLpgSQL FETCH documentation is has ref on SQL FETCH command. SQL FETCH
    > allows only int constants as count. PLpgSQL allows any expressions. In this
    > case documentation is not clear, and people can be messy - and apply SQL
    > FETCH limits on PLpgSQL FETCH.
    
    Right.  Pushed with some rewriting.
    
    			regards, tom lane
    
    
    
  3. Re: small doc fix - using expressions in plpgsql FETCH command

    Pavel Stehule <pavel.stehule@gmail.com> — 2018-07-12T17:00:15Z

    2018-07-12 18:29 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:
    
    > Pavel Stehule <pavel.stehule@gmail.com> writes:
    > > PLpgSQL FETCH documentation is has ref on SQL FETCH command. SQL FETCH
    > > allows only int constants as count. PLpgSQL allows any expressions. In
    > this
    > > case documentation is not clear, and people can be messy - and apply SQL
    > > FETCH limits on PLpgSQL FETCH.
    >
    > Right.  Pushed with some rewriting.
    >
    
    Thank you
    
    Pavel
    
    
    >                         regards, tom lane
    >