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 <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/cahgqgwh2xda7cqhkkzfiwq9+wabdum8vh6br2xnmaig3vi-...@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(-)

Reply via email to