Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
Дата
Msg-id CAKFQuwZ=pA_pNhvVFn-Cdto2vXbdFRJif8mXb4MB5PT5-KUGvQ@mail.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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
On Mon, Jul 17, 2023 at 6:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Jul 17, 2023 at 4:53 PM Curt Kolovson <ckolovson@gmail.com> wrote:
>> The actual results (shown below) are different than shown on this doc
>> page.

> SPI_exec sees "INSERT 0 2" as the command tag from the SQL command you
> passed and so 2 is the output of the execq function call.
> No INFO messages appear because you did not include a returning clause.
> The 1 you passed to the call is immaterial if the query you supply doesn't
> produce a result set.

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


We fixed the wording for the API argument but not the example that demonstrated it.

David J.

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

Предыдущее
От: Curt Kolovson
Дата:
Сообщение: Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html