From: | Kieran McCusker <kieran(dot)mccusker(at)gmail(dot)com> |
---|---|
To: | daniel(at)yesql(dot)se |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: plpython does not honour max-rows |
Date: | 2023-05-02 11:37:00 |
Message-ID: | CAGgUQ6GBpw-vkzxuuTk3au8Hq+YezG5sv3yR=YjE3CbOqp-a3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks for the quick response. Chapter 46.6.1 says that max-rows is an
optional row limit. Unless I missed it there is nothing in the
documentation about zero meaning all rows. Wouldn't it rather be like SQL
LIMIT 0 meaning all rows?
Anyway it was surprising gotcha, but of course easy to code around.
Kieran
On Tue, 2 May 2023, 12:01 Daniel Gustafsson, <daniel(at)yesql(dot)se> wrote:
> > On 2 May 2023, at 12:30, Kieran McCusker <kieran(dot)mccusker(at)gmail(dot)com>
> wrote:
>
> > I came across this when developing a sampling function using
> plpy.execute that needs to be able to sample zero rows. What actually
> happens is that zero is ignored for max-rows and all rows are returned.
>
> A max_rows of less than or equal to zero is IIRC interpreted as "fetch all
> rows". I think this works as intended, is it documented anywhere to work
> in
> another way?
>
> --
> Daniel Gustafsson
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2023-05-02 11:48:46 | Re: plpython does not honour max-rows |
Previous Message | Daniel Gustafsson | 2023-05-02 11:01:00 | Re: plpython does not honour max-rows |