diff options
Diffstat (limited to 'doc/src/sgml/plpython.sgml')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index b92c8662bf2..0ca80fb1a15 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -937,7 +937,7 @@ $$ LANGUAGE plpythonu; <variablelist> <varlistentry> - <term><literal>plpy.<function>execute</function>(<replaceable>query</replaceable> [, <replaceable>max-rows</replaceable>])</literal></term> + <term><literal>plpy.<function>execute</function>(<replaceable>query</replaceable> [, <replaceable>limit</replaceable>])</literal></term> <listitem> <para> Calling <function>plpy.execute</function> with a query string and an @@ -946,6 +946,15 @@ $$ LANGUAGE plpythonu; </para> <para> + If <replaceable>limit</replaceable> is specified and is greater than + zero, then <function>plpy.execute</function> retrieves at + most <replaceable>limit</replaceable> rows, much as if the query + included a <literal>LIMIT</literal> + clause. Omitting <replaceable>limit</replaceable> or specifying it as + zero results in no row limit. + </para> + + <para> The result object emulates a list or dictionary object. The result object can be accessed by row number and column name. For example: <programlisting> @@ -1035,7 +1044,7 @@ foo = rv[i]["my_column"] <varlistentry> <term><literal>plpy.<function>prepare</function>(<replaceable>query</replaceable> [, <replaceable>argtypes</replaceable>])</literal></term> - <term><literal>plpy.<function>execute</function>(<replaceable>plan</replaceable> [, <replaceable>arguments</replaceable> [, <replaceable>max-rows</replaceable>]])</literal></term> + <term><literal>plpy.<function>execute</function>(<replaceable>plan</replaceable> [, <replaceable>arguments</replaceable> [, <replaceable>limit</replaceable>]])</literal></term> <listitem> <para> <indexterm><primary>preparing a query</primary><secondary>in PL/Python</secondary></indexterm> |