Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
От | Curt Kolovson |
---|---|
Тема | Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html |
Дата | |
Msg-id | 9F566B71-42A3-4502-85CA-076BA8C5BDD5@gmail.com обсуждение исходный текст |
Ответ на | Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
|
Список | pgsql-docs |
I’d vote for showing both (with RETURNING and without), since without it the second argument to SPI_exec has no effect inthis example, which may not be obvious. That seems to be one of the subtle points illustrated by this example. > On Jul 17, 2023, at 7:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > "David G. Johnston" <david.g.johnston@gmail.com> writes: >>> On Mon, Jul 17, 2023 at 6:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> I think his point is that this example does not behave as the >>> documentation claims. Which it does not, according to my >>> tests here. I find this a bit disturbing --- did we intentionally >>> change the behavior of SPI_exec somewhere along the line? > >> Appears to be a documentation fix oversight back in v9.0 >> https://github.com/postgres/postgres/commit/2ddc600f8f0252a0864e85d5cc1eeb3b9687d7e9 > > Ah, thanks for the pointer. I'd just been trying to bisect where > between 8.4 and 9.0 it changed, but failed because early-9.0 versions > don't build at all with current bison :-( > > Anyway, given that the example needs updating, how should we do that > exactly? Is it worth demonstrating both the behavior with RETURNING > and that without? If not, which one to show? > > regards, tom lane
В списке pgsql-docs по дате отправления: