agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: intmail01 <intmail01@gmail.com>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: How to sort deleted rows with trigger. Some rows before then some rows after.
Date: Mon, 20 Sep 2021 10:58:03 -0600
Message-ID: <b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com> (raw)
In-Reply-To: <bcddros62v36q1vuc6ukcm3v.1632153025543@email.android.com>
References: <bcddros62v36q1vuc6ukcm3v.1632153025543@email.android.com>

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
> >
> >
> >
>






view thread (5+ messages)

Message-ID: <b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com>
Permalink:  ../b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com/
Also on:    postgresql.org/message-id/b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: robjsargent@gmail.com, intmail01@gmail.com, pgsql-sql@lists.postgresql.org
  Subject: Re: How to sort deleted rows with trigger. Some rows before then some rows after.
  In-Reply-To: <b7e2662f-317a-f8a5-eb62-727a7b884982@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox