Autocommit for multi call procedure
Autocommit for multi call procedure
Hi guys,
I am trying to call 2 stored procedures in a run command that has commit statement. However, I received an error 'Invalid transaction termination'. Could you help me on this issue?
Regards,
Trang
Re: Autocommit for multi call procedure
Hi Trang,
Can you try calling the same from the PSQL tool - https://www.pgadmin.org/docs/pgadmin4/5.7/psql_tool.html if it works ?
Query tool runs queries wrapped inside BEGIN and END. Maybe that is causing the issue.
On Fri, Sep 17, 2021 at 12:20 PM Trang Le <trang.le@evizi.com> wrote:
Hi guys,I am trying to call 2 stored procedures in a run command that has commit statement. However, I received an error 'Invalid transaction termination'. Could you help me on this issue?Regards,Trang
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Re: Autocommit for multi call procedure
It is probably that the COMMIT inside the loop is called more than once. The BEGIN is outside the loop.
Try adding a BEGIN inside the LOOP so that the COMMIT pairs with the BEGIN.
On Mon, Sep 20, 2021 at 12:08 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Trang,Can you try calling the same from the PSQL tool - https://www.pgadmin.org/docs/pgadmin4/5.7/psql_tool.html if it works ?Query tool runs queries wrapped inside BEGIN and END. Maybe that is causing the issue.On Fri, Sep 17, 2021 at 12:20 PM Trang Le <trang.le@evizi.com> wrote:Hi guys,I am trying to call 2 stored procedures in a run command that has commit statement. However, I received an error 'Invalid transaction termination'. Could you help me on this issue?Regards,Trang--Thanks,Aditya ToshniwalpgAdmin Hacker | Software Architect | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Re: Autocommit for multi call procedure
Hi Michael,
I already add sublock begin end and it have the same issue.
Regards,
Trang
On Mon, Sep 20, 2021 at 7:33 PM Michael Shapiro <mshapiro51@gmail.com> wrote:
It is probably that the COMMIT inside the loop is called more than once. The BEGIN is outside the loop.Try adding a BEGIN inside the LOOP so that the COMMIT pairs with the BEGIN.On Mon, Sep 20, 2021 at 12:08 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Trang,Can you try calling the same from the PSQL tool - https://www.pgadmin.org/docs/pgadmin4/5.7/psql_tool.html if it works ?Query tool runs queries wrapped inside BEGIN and END. Maybe that is causing the issue.On Fri, Sep 17, 2021 at 12:20 PM Trang Le <trang.le@evizi.com> wrote:Hi guys,I am trying to call 2 stored procedures in a run command that has commit statement. However, I received an error 'Invalid transaction termination'. Could you help me on this issue?Regards,Trang--Thanks,Aditya ToshniwalpgAdmin Hacker | Software Architect | edbpostgres.com"Don't Complain about Heat, Plant a TREE"