Thread: BUG #14241: i want to do commit and rollback in one plpgsql block..
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDI0MQpMb2dnZWQgYnk6ICAg ICAgICAgIFp1YmFpciBBbGFtCkVtYWlsIGFkZHJlc3M6ICAgICAgenppYTg4 QGdtYWlsLmNvbQpQb3N0Z3JlU1FMIHZlcnNpb246IDkuNS4zCk9wZXJhdGlu ZyBzeXN0ZW06ICAgd2luZG93czcteDY0KDY0IGJpdCkKRGVzY3JpcHRpb246 ICAgICAgICAKCkNSRUFURSBPUiBSRVBMQUNFIEZVTkNUSU9OICBERUxST0xM KCkNCglSRVRVUk5TIElOVCBBUyAkVl9DSE9JQ0UkDQpCRUdJTg0KICAgICAg ICAgICBJRiBWX0NIT0lDRT0xIFRIRU4NCiAgICAgICAgICAgICAgICAgICAg ICAgICAgIERFTEVURSBGUk9NIElURU1TDQogICAgICAgICAgICAgICAgICAg ICAgICAgICBXSEVSRSBpdGVtaWQ9NDsNCiAgICAgICAgICAgICAgICAgICAt LURCTVNfT1VUUFVULlBVVF9MSU5FKCdFTVBMWUVFIFJFQ09SRCBERUxFVEVE ClNVQ0VTU0ZVTExZJyk7DQogICAgICAgICAgICAgICAgICAgRU5EIElGOw0K ICAgICAgICAgICBJRiBWX0NIT0lDRT0yIFRIRU4NCiAgICAgICAgICAgICAg ICBST0xMQkFDSzsNCgkJQ09NTUlUOw0KICAgICAgICAgICAtLS1EQk1TX09V VFBVVC5QVVRfTElORSgnUk9MTCBCQUNLIENPTVBMRVRFRCAgU1VDRVNTRlVM TFknKTsNCiAgICAgICAgICAgRU5EIElGOw0KICAgICAgICAgICBSRVRVUk4g Vl9DSE9JQ0U7DQogICBFTkQ7DQogICAkVl9DSE9JQ0UkDQogICBMQU5HVUFH RSBQTFBHU1FMOw0KDQp3aGVuIGkgZW50ZXIgbXkgY2hvaWNlIDIgaS5lIGZv ciByb2xsYmFjayBhbmQgY29tbWl0IHRoZW4gdGhhdCB0aW1lIHRoaXMKZXJy b3IgaXMgZ2VuZXJhdGluZy4NCkVSUk9SOiAgY3VycmVudCB0cmFuc2FjdGlv biBpcyBhYm9ydGVkLCBjb21tYW5kcyBpZ25vcmVkIHVudGlsIGVuZCBvZgp0 cmFuc2FjdGlvbiBibG9jaw0KDQoqKioqKioqKioqIEVycm9yICoqKioqKioq KioNCg0KRVJST1I6IGN1cnJlbnQgdHJhbnNhY3Rpb24gaXMgYWJvcnRlZCwg Y29tbWFuZHMgaWdub3JlZCB1bnRpbCBlbmQgb2YNCnRyYW5zYWN0aW9uIGJs b2NrDQpTUUwgc3RhdGU6IDI1UDAyDQoNCg0KDQogcGxlYXNlIGdpdmUgbWUg cGVyZmVjdCBzb2x1dGlvbiBmb3IgdXNpbmcgIGNvbW1pdCBhbmQgcm9sbGJh Y2sgaW4gb25lIApwbHBnc3FsIHByb2dyYW0gYmxvY2suCgo=
Re: BUG #14241: i want to do commit and rollback in one plpgsql block..
From
"David G. Johnston"
Date:
On Mon, Jul 11, 2016 at 3:32 AM, <zzia88@gmail.com> wrote: > The following bug has been logged on the website: > > Bug reference: 14241 > Logged by: Zubair Alam > Email address: zzia88@gmail.com > PostgreSQL version: 9.5.3 > Operating system: windows7-x64(64 bit) > Description: > > =E2=80=8BThis seems to be a duplicate of bug # 14240 which has already been responded to. David J. =E2=80=8B
Re: BUG #14241: i want to do commit and rollback in one plpgsql block..
From
"David G. Johnston"
Date:
On Mon, Jul 11, 2016 at 9:40 AM, zubair alam <zzia88@gmail.com> wrote: > Please give me exact answer. i am waiting for solution. or tell how i hav= e > 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.g.johnston@gmail.com> wrote: > >> On Mon, Jul 11, 2016 at 3:32 AM, <zzia88@gmail.com> wrote: >> >>> The following bug has been logged on the website: >>> >>> Bug reference: 14241 >>> Logged by: Zubair Alam >>> Email address: zzia88@gmail.com >>> PostgreSQL version: 9.5.3 >>> Operating system: windows7-x64(64 bit) >>> Description: >>> >>> >> =E2=80=8BThis seems to be a duplicate of bug # 14240 which has already b= een >> responded to. >> >> David J. >> =E2=80=8B >> >> > =E2=80=8BTo 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 ). =E2=80=8B" I'll just confirm this is true. =E2=80=8BThat is as exact as you are going to get - at least from me. =E2=80=8BIf 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. =E2=80=8BAlso, it is customary to inline or bottom-post on these list - ju= st like Francisco and I both did in our replies to your initial bug reports. David J.