Re: Ambiguity in VALUES synopsis: LIMIT vs FETCH - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Ambiguity in VALUES synopsis: LIMIT vs FETCH
Date
Msg-id CAKFQuwYmNY98SiUc8PQMq5iEGDq4EbeoXC4M9A+Co11RAPKOow@mail.gmail.com
Whole thread Raw
In response to Ambiguity in VALUES synopsis: LIMIT vs FETCH  (Cheng Ding <cheng.ding@utexas.edu>)
List pgsql-docs
On Tuesday, August 26, 2025, Cheng Ding <cheng.ding@utexas.edu> wrote:

Hello docs team,

I believe there’s an ambiguity in the VALUES command synopsis that can mislead readers into thinking LIMIT and FETCH can be used together.

Alternatively, add a short note right under the synopsis:

Note: FETCH { FIRST | NEXT } … ONLY is an alternative to LIMIT and cannot be used together with it.

The final paragraph in description explains the either-or nature of limit/fetch.  It also directs the user to the Select page for more details.  And the comparability section also explains that fetch is standard while limit is PostgresSQL-specific.

IMO the choice of representation here is acceptable.  The redundancy should be a big tell even if you don’t read the docs carefully.  And hopefully whatever source you actually learn about the feature from covers the material well and this quick reference page is just a reminder that both exist.

David J.

pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Inaccurate statement about log shipping replication mode
Next
From: Nicola Palavecino
Date:
Subject: Re: Small typo in doc