Re: BUG #14241: i want to do commit and rollback in one plpgsql block..

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: zubair alam <zzia88(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14241: i want to do commit and rollback in one plpgsql block..
Date: 2016-07-11 13:48:24
Message-ID: CAKFQuwY3a7v+pdjg_Wm5b2Mdmp-kuEGk69oeTBw5Lo3m7zS6nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 11, 2016 at 9:40 AM, zubair alam <zzia88(at)gmail(dot)com> wrote:

> Please give me exact answer. i am waiting for solution. or tell how i have
> to use in commit and rollback in one plpgsql block.
> if you have knowledge then give me exact answer.
>
> On Mon, Jul 11, 2016 at 4:14 PM, David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>> On Mon, Jul 11, 2016 at 3:32 AM, <zzia88(at)gmail(dot)com> wrote:
>>
>>> The following bug has been logged on the website:
>>>
>>> Bug reference: 14241
>>> Logged by: Zubair Alam
>>> Email address: zzia88(at)gmail(dot)com
>>> PostgreSQL version: 9.5.3
>>> Operating system: windows7-x64(64 bit)
>>> Description:
>>>
>>>
>> ​This seems to be a duplicate of bug # 14240 which has already been
>> responded to.
>>
>> David J.
>> ​
>>
>>
>
​To quote the other reply:

"
Does not seem like a bug, IIRC commit/rollback is not allowed inside
functions ( savepoints are, you may try to work with them ).
​"

I'll just confirm this is true.

​That is as exact as you are going to get - at least from me.

​If you want more I suggest you reply to the original thread with
additional detail about what you are trying to accomplish. As it stands
you state you need to do something which is not possible in PostgreSQL.
Without context it is difficult to suggest alternatives.

Also, do not reply to people personally. These are public lists and
generally the people contributing to them either want to share the
information broadly or, as in this case, rely upon others to share in the
work. I have re-added pgsql-bugs on this reply.

​Also, it is customary to inline or bottom-post on these list - just like
Francisco and I both did in our replies to your initial bug reports.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thom Brown 2016-07-11 15:19:19 Incorrect Spanish error message.
Previous Message Magnus Hagander 2016-07-11 13:15:15 Re: BUG #14230: Wrong timeline returned by pg_stop_backup on a standby