On Wed, Jun 13, 2018 at 04:17:55PM -0300, Euler Taveira wrote:
> 2018-05-16 10:22 GMT-03:00 PG Doc comments form <nore...@postgresql.org>:
> > The documentation of the SELECT statement lists FETCH FIRST/OFFSET as an
> > alternative to the proprietary LIMIT clause.
> >
> > https://www.postgresql.org/docs/current/static/sql-select.html#SQL-LIMIT
> >
> > However, chapter 7.6 about LIMIT/OFFSET does not mention the alternative.
> >
> > https://www.postgresql.org/docs/current/static/queries-limit.html
> >
> Make sense. I propose the attached patch that adds a link to the LIMIT
> section in the SELECT reference page. I also renamed the "number"
> variables to the same names used in the SELECT reference page and put
> OFFSET in a new line (it looks visually better).

I applied the attached patch based on your patch to master.  Thanks.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.
commit 8127e6e8ad
Author: Bruce Momjian <br...@momjian.us>
Date:   Fri Nov 17 16:46:43 2023 -0500

    doc:  update query section to show LIMIT/OFFSET like SELECT
    
    The parameter names were slightly better in SELECT, so make them match.
    
    Reported-by: Euler Taveira
    
    Discussion: https://postgr.es/m/cahe3wgh-eyuablg1vs3qthii1tgws31h-fyegrdda7otous...@mail.gmail.com
    
    Backpatch-through: master

diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml
index 8a4674e5f2..648b283b06 100644
--- a/doc/src/sgml/queries.sgml
+++ b/doc/src/sgml/queries.sgml
@@ -1912,7 +1912,8 @@ SELECT a + b AS sum, c FROM table1 ORDER BY sum + c;          -- wrong
 SELECT <replaceable>select_list</replaceable>
     FROM <replaceable>table_expression</replaceable>
     <optional> ORDER BY ... </optional>
-    <optional> LIMIT { <replaceable>number</replaceable> | ALL } </optional> <optional> OFFSET <replaceable>number</replaceable> </optional>
+    <optional> LIMIT { <replaceable class="parameter">count</replaceable> | ALL } </optional>
+    <optional> OFFSET <replaceable class="parameter">start</replaceable> </optional>
 </synopsis>
   </para>
 

Reply via email to