diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 6c81ee8fbe..105c24c8f2 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -451,7 +451,12 @@ use strict; spi_exec_query executes an SQL command and returns the entire row set as a reference to an array of hash -references. You should only use this command when you know +references. If max-rows is zero then all rows then +the command is executed for all rows it applies to. If +max-rows is greater than zero, then no more than +max-rows will be retrieved; execution stops when the +count is reached, much like adding a LIMIT clause to +the query. You should only use this command when you know that the result set will be relatively small. Here is an example of a query (SELECT command) with the optional maximum number of rows: diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index e190c90f45..9881c8bf11 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -794,7 +794,12 @@ $$ LANGUAGE plpython3u; Calling plpy.execute with a query string and an optional row limit argument causes that query to be run and the result to - be returned in a result object. + be returned in a result object. If max-rows is zero + then all rows then the command is executed for all rows it applies to. + If max-rows is greater than zero, then no more than + max-rows will be retrieved; execution stops when the + count is reached, much like adding a LIMIT clause to + the query. diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index bf56ba6b1c..deaf9f3f4e 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -344,6 +344,11 @@ $$ LANGUAGE pltcl; spi_exec the maximum number of rows to process in the command. The effect of this is comparable to setting up a query as a cursor and then saying FETCH n. + If -count is zero then all rows then the command + is executed for all rows it applies to. If -count + is greater than zero, then no more than -count + will be retrieved; execution stops when the count is reached, much + like adding a LIMIT clause to the query. If the command is a SELECT statement, the values of the