Re: plpython does not honour max-rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpython does not honour max-rows
Дата
Msg-id 2678018.1683036150@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plpython does not honour max-rows  (Kieran McCusker <kieran.mccusker@gmail.com>)
Ответы Re: plpython does not honour max-rows  (Daniel Gustafsson <daniel@yesql.se>)
Re: plpython does not honour max-rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Kieran McCusker <kieran.mccusker@gmail.com> writes:
> Without making too much of a fuss, wouldn't it be simpler to honour a
> row-limit of zero rather than document that it doesn't work?

plpy.execute is a thin wrapper around SPI_execute, which does document
this point:

   If <parameter>count</parameter> is zero then the command is executed
   for all rows that it applies to.  If <parameter>count</parameter>
   is greater than zero, then no more than <parameter>count</parameter> rows
   will be retrieved; execution stops when the count is reached, much like
   adding a <literal>LIMIT</literal> clause to the query.

Since that's stood for a few decades now, changing it seems impossible
from the backwards-compatibility standpoint.  However, it does seem
appropriate to repeat that material in the wrapper's documentation.

I wonder whether the similar plperl and pltcl wrappers are also
documentation-shy here.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Memory leak on subquery as scalar operand
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17906: Segmentation fault and database crash during procedure call