Re: committing inside cursor loop

2018-03-29 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: >> So... what is a pl/* that does _not_ use pinned cursors for cursor >> loops supposed to do in this case? Peter> Other than maybe using pinned cursors, one would have to look at Peter> the whole picture and see

Re: committing inside cursor loop

2018-03-29 Thread Peter Eisentraut
On 3/29/18 07:37, Andrew Gierth wrote: >> "Peter" == Peter Eisentraut writes: > > Peter> Committed, thanks! > > So... what is a pl/* that does _not_ use pinned cursors for cursor loops > supposed to do in this case? Other than maybe using pinned cursors,

Re: committing inside cursor loop

2018-03-29 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: Peter> Committed, thanks! So... what is a pl/* that does _not_ use pinned cursors for cursor loops supposed to do in this case? -- Andrew (irc:RhodiumToad)

Re: committing inside cursor loop

2018-03-28 Thread Peter Eisentraut
On 3/28/18 11:34, Ildus Kurbangaliev wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tested, passed > > I

Re: committing inside cursor loop

2018-03-28 Thread Ildus Kurbangaliev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed I have checked new version. Although I can miss something,

Re: committing inside cursor loop

2018-03-26 Thread Peter Eisentraut
From: Peter Eisentraut <pete...@gmx.net> Date: Mon, 26 Mar 2018 15:40:49 -0400 Subject: [PATCH v2] PL/pgSQL: Allow committing inside cursor loop Previously, committing or aborting inside a cursor loop was prohibited because that would close and remove the cursor. To allow that, autom

Re: committing inside cursor loop

2018-03-19 Thread Peter Eisentraut
On 3/14/18 08:05, Ildus Kurbangaliev wrote: >> The ROLLBACK call in the first loop iteration undoes the UPDATE >> command that drives the loop. Is it then sensible to continue the >> loop? >> > I think that in the first place ROLLBACK was prohibited because of cases > like this, but it seems to

Re: committing inside cursor loop

2018-03-14 Thread Ildus Kurbangaliev
On Tue, 13 Mar 2018 11:08:36 -0400 Peter Eisentraut wrote: > On 3/6/18 07:48, Ildus Kurbangaliev wrote: > > Although as was discussed before it seems inconsistent without > > ROLLBACK support. There was a little discussion about it, but no > > replies. Maybe the

Re: committing inside cursor loop

2018-03-13 Thread Peter Eisentraut
On 3/6/18 07:48, Ildus Kurbangaliev wrote: > Although as was discussed before it seems inconsistent without ROLLBACK > support. There was a little discussion about it, but no replies. Maybe > the status of the patch should be changed to 'Waiting on author' until > the end of discussion. I'm

Re: committing inside cursor loop

2018-03-06 Thread Ildus Kurbangaliev
On Tue, 20 Feb 2018 09:11:50 -0500 Peter Eisentraut wrote: > Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL. > As alluded to in earlier threads, this is done by converting such > cursors to holdable automatically. A special flag "auto-held"

Re: committing inside cursor loop

2018-02-22 Thread Simon Riggs
On 20 February 2018 at 14:45, Tom Lane wrote: > Peter Eisentraut writes: >> Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL. As >> alluded to in earlier threads, this is done by converting such cursors >> to holdable

Re: committing inside cursor loop

2018-02-20 Thread Simon Riggs
On 20 February 2018 at 14:11, Peter Eisentraut wrote: > Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL. As > alluded to in earlier threads, this is done by converting such cursors > to holdable automatically. A special flag "auto-held" marks

Re: committing inside cursor loop

2018-02-20 Thread Tom Lane
Peter Eisentraut writes: > Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL. As > alluded to in earlier threads, this is done by converting such cursors > to holdable automatically. A special flag "auto-held" marks such > cursors, so we know

committing inside cursor loop

2018-02-20 Thread Peter Eisentraut
sentraut <pete...@gmx.net> Date: Tue, 20 Feb 2018 08:52:23 -0500 Subject: [PATCH v1] PL/pgSQL: Allow committing inside cursor loop Previously, committing inside a cursor loop was prohibited because that would close and remove the cursor. To allow that, automatically convert such cursors to