pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Curt Kolovson <ckolovson@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
Date: Mon, 17 Jul 2023 21:22:02 -0400
Message-ID: <4114624.1689643322@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbN7gzyEh-LBkXh+68xH8NS3QumYG8Tj6XVzG6zDvSuWg@mail.gmail.com>
References: <CANhYJV6HWtgz_qjx_APfK0PAgLUzY-2vjLuj7i_o=TZF1LAQew@mail.gmail.com>
	<CAKFQuwbN7gzyEh-LBkXh+68xH8NS3QumYG8Tj6XVzG6zDvSuWg@mail.gmail.com>

"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?

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <4114624.1689643322@sss.pgh.pa.us>
Permalink:  ../4114624.1689643322@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4114624.1689643322@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, ckolovson@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html
  In-Reply-To: <4114624.1689643322@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox