Re: How to sort deleted rows with trigger. Some rows before then some rows after.

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: intmail01 <intmail01(at)gmail(dot)com>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: How to sort deleted rows with trigger. Some rows before then some rows after.
Date: 2021-09-20 16:58:03
Message-ID: b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 9/20/21 9:53 AM, intmail01 wrote:
>
> How to use transaction in a trigger ? It seems there is no possibility
> to control transaction within function
>
>
>
>
You would start a transaction, send two SQL statements.  The trigger is
within the transaction (and does not test for negative values).
> For each batch of deletes send two delete statements in a single
> transaction. The first with negative values. The second with
> non-negative values.
> > Thank you
> >
> >
> >
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Matias Montroull 2021-09-24 13:23:13 SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont
Previous Message David G. Johnston 2021-09-20 16:22:30 Re: How to sort deleted rows with trigger. Some rows before then some rows after.