From: Bruce Momjian <bruce@momjian.us>
To: Euler Taveira <euler@timbira.com.br>
Cc: spam_eater@gmx.net
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Missing documentation for FETCH FIRST in chapter 7.6
Date: Fri, 17 Nov 2023 16:48:23 -0500
Message-ID: <ZVffp7398eVsjZxj@momjian.us> (raw)
In-Reply-To: <CAHE3wgh-EYuAbLG1VS3QTHii1TgWS31h-fYEgrdda7oTOuskOQ@mail.gmail.com>
References: <152647693295.27207.7601447066719718827@wrigleys.postgresql.org>
<CAHE3wgh-EYuAbLG1VS3QTHii1TgWS31h-fYEgrdda7oTOuskOQ@mail.gmail.com>
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 <noreply@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 <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
Attachments:
[text/x-diff] limit.diff (1.1K, ../ZVffp7398eVsjZxj@momjian.us/2-limit.diff)
download | inline diff:
commit 8127e6e8ad
Author: Bruce Momjian <bruce@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-fYEgrdda7oTOuskOQ@mail.gmail.com
Backpatch-through: master
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgmlindex 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 instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, euler@timbira.com.br, spam_eater@gmx.net, pgsql-docs@lists.postgresql.org
Subject: Re: Missing documentation for FETCH FIRST in chapter 7.6
In-Reply-To: <ZVffp7398eVsjZxj@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox