pgsql: plpgsql: Clarify the LIMIT 1 example in the too-many-rows hint

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: plpgsql: Clarify the LIMIT 1 example in the too-many-rows hint
Date: 2026-11-16 02:06:59
Message-ID: E1xSm7X-00000000rfB-1nFP@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

plpgsql: Clarify the LIMIT 1 example in the too-many-rows hint

The hint for queries returning more than one row suggested using LIMIT 1,
but it was also shown for commands such as UPDATE ... RETURNING, which
do not support that clause.

Reword the hint to use LIMIT 1 with SELECT as an example, retaining
concrete advice for SELECT queries without suggesting that LIMIT 1
can be used with every command.

Author: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwH2xDa7CqHkKZfiWQ9+waBdUm8Vh6Br2XNMAiG3vi-hQQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/60cdae088b6d86e38059c32a0a1fd66e46de2389

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 2 +-
src/test/regress/expected/plpgsql.out | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-16 09:43:27 pgsql: Translation updates
Previous Message Zsolt Parragi 2026-11-15 21:15:36 Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned