Re: Attempting to delete excess rows from table with BATCH DELETE - Mailing list pgsql-general

From Ron Johnson
Subject Re: Attempting to delete excess rows from table with BATCH DELETE
Date
Msg-id CANzqJaCydWJm8utvhLMWy62MGRYP0qdK134WB8NzXTJf=KUEPg@mail.gmail.com
Whole thread Raw
In response to Re: Attempting to delete excess rows from table with BATCH DELETE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Attempting to delete excess rows from table with BATCH DELETE
List pgsql-general
On Tue, Jan 27, 2026 at 10:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, January 27, 2026, Gus Spier <gus.spier@gmail.com> wrote:
>> I write a procedure to accomplish all this work but it persists in
>> returning a error to the effect that a COMMIT is not valid in a block
>> tht tries to DELETE data.

> Haven’t tested to be sure but this doesn’t seem like a community edition
> limitation.

Yeah, you can definitely do that in standard Postgres (at least since
we invented procedures).

Hmm.  Must have been START TRANSACTION which I remember causing issues in DO blocks.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Attempting to delete excess rows from table with BATCH DELETE
Next
From: Tom Lane
Date:
Subject: Re: Attempting to delete excess rows from table with BATCH DELETE