From: Bruce Momjian <bruce@momjian.us>
To: Rajeev rastogi <rajeev.rastogi@huawei.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Hitoshi Harada <umi.tanuki@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] BUG #6572: The example of SPI_execute is bogus
Date: Thu, 24 Jan 2013 15:59:42 -0500
Message-ID: <20130124205942.GC21914@momjian.us> (raw)
In-Reply-To: <BF2827DCCE55594C8D7A8F7FFD3AB771313C5825@SZXEML508-MBS.china.huawei.com>
References: <E1SFFEX-0006wr-AT@wrigleys.postgresql.org>
<25939.1333551641@sss.pgh.pa.us>
<CAP7QgmkvMYAwYw1wXAtxbVOEYVeJs7hBUNFkbgssaCxc_FNa_w@mail.gmail.com>
<CA+TgmobS_t4ixo+wEAx-KyhRzapYTapY06q0qSctFuGiOBSEmA@mail.gmail.com>
<9674.1334507379@sss.pgh.pa.us>
<20120829031647.GB26103@momjian.us>
<BF2827DCCE55594C8D7A8F7FFD3AB771313C5825@SZXEML508-MBS.china.huawei.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Wed, Aug 29, 2012 at 01:13:51PM +0000, Rajeev rastogi wrote:
> ________________________________________
> From: pgsql-bugs-owner@postgresql.org [pgsql-bugs-owner@postgresql.org] on behalf of Bruce Momjian [bruce@momjian.us]
> Sent: Wednesday, August 29, 2012 8:46 AM
> To: Tom Lane
> Cc: Robert Haas; Hitoshi Harada; pgsql-bugs@postgresql.org; pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] [BUGS] BUG #6572: The example of SPI_execute is bogus
>
> On Sun, Apr 15, 2012 at 12:29:39PM -0400, Tom Lane wrote:
> > Robert Haas <robertmhaas@gmail.com> writes:
> > > On Thu, Apr 5, 2012 at 2:39 AM, Hitoshi Harada <umi.tanuki@gmail.com> wrote:
> > >> On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >>> Given the lack of complaints since 9.0, maybe we should not fix this
> > >>> but just redefine the new behavior as being correct? But it seems
> > >>> mighty inconsistent that the tuple limit would apply if you have
> > >>> RETURNING but not when you don't. In any case, the ramifications
> > >>> are wider than one example in the SPI docs.
> >
> > >> To be honest, I was surprised when I found tcount parameter is said to
> > >> be applied to even INSERT. I believe people think that parameter is
> > >> to limit memory consumption when returning tuples thus it'd be applied
> > >> for only SELECT or DML with RETURNING. So I'm +1 for non-fix but
> > >> redefine the behavior. Who wants to limit the number of rows
> > >> processed inside the backend, from SPI?
> >
> > > Yeah.
> >
> > Okay, apparently nobody cares about RETURNING behaving differently from
> > non-RETURNING, so the consensus is to redefine the current behavior as
> > correct. That means what we need is to go through the docs and see what
> > places need to be updated (and, I guess, back-patch the changes to 9.0).
> > I will get to this if nobody else does, but not right away.
>
> > Would someone make the doc change outlined above? Thanks.
>
>
> I would like to work on this documentation bug.
> As per analysis I am planning to update following SPI function:
> 1. SPI_Execute: Here we will mention that argument count is used only for the kind of command which returns result i.e. all kind of SELECT and DML with returning clause. count is ignored for any other kind of commands. I will add one example also to indicate the difference.
> 2. SPI_execute_plan_with_paramlist: Here we can give just reference to SPI_execute i.e. I will mention that count has same interpretation as in SPI_execute.
> 3. SPI_execp: Here we can give just reference to SPI_execute i.e. I will mention that count has same interpretation as in SPI_execute.
Would someone please provide answers to these questions, or write a
patch?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, rajeev.rastogi@huawei.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, umi.tanuki@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] BUG #6572: The example of SPI_execute is bogus
In-Reply-To: <20130124205942.GC21914@momjian.us>
References: <E1SFFEX-0006wr-AT@wrigleys.postgresql.org> <25939.1333551641@sss.pgh.pa.us> <CAP7QgmkvMYAwYw1wXAtxbVOEYVeJs7hBUNFkbgssaCxc_FNa_w@mail.gmail.com> <CA+TgmobS_t4ixo+wEAx-KyhRzapYTapY06q0qSctFuGiOBSEmA@mail.gmail.com> <9674.1334507379@sss.pgh.pa.us> <20120829031647.GB26103@momjian.us> <BF2827DCCE55594C8D7A8F7FFD3AB771313C5825@SZXEML508-MBS.china.huawei.com> <20130124205942.GC21914@momjian.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