Re: Autocommit for multi call procedure

From: Michael Shapiro <mshapiro51(at)gmail(dot)com>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: Trang Le <trang(dot)le(at)evizi(dot)com>, "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Autocommit for multi call procedure
Date: 2021-09-20 12:33:05
Message-ID: CAGCvxeZmN3bqQ7dEceDSx8Ttfrd2eHz+=snX-o8+QaeDT9vjaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgadmin-support

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(dot)toshniwal(at)enterprisedb(dot)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(dot)le(at)evizi(dot)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?
>>
>> [image: image.png]
>>
>> [image: image.png]
>>
>> Regards,
>> Trang
>>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com>
> "Don't Complain about Heat, Plant a TREE"
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2021-09-20 14:43:07 Re: [pgAdmin][RM-5741]: [Schema Diff] Revisit all the CREATE and DROP DDL's to add appropriate 'IF EXISTS', 'CASCADE' and 'CREATE OR REPLACE'
Previous Message Nikhil Mohite 2021-09-20 10:28:27 Re: [pgAdmin][RM-5741]: [Schema Diff] Revisit all the CREATE and DROP DDL's to add appropriate 'IF EXISTS', 'CASCADE' and 'CREATE OR REPLACE'

Browse pgadmin-support by date

  From Date Subject
Next Message Trang Le 2021-09-21 00:44:55 Re: Autocommit for multi call procedure
Previous Message Aditya Toshniwal 2021-09-20 05:32:17 Re: Autocommit for multi call procedure