pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: stan <stanb@panix.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: A question about the number of times a trigger will fire
Date: Thu, 5 Mar 2020 13:05:16 -0500
Message-ID: <20200305180516.GA28124@panix.com> (raw)
In-Reply-To: <CAKFQuwZA0ZEx7OehZ-26btGSwWxNmqeFUMc8Sz_PAAHUM1VM5A@mail.gmail.com>
References: <20200305145811.GA17538@panix.com>
	<CAKFQuwZA0ZEx7OehZ-26btGSwWxNmqeFUMc8Sz_PAAHUM1VM5A@mail.gmail.com>

On Thu, Mar 05, 2020 at 08:58:32AM -0700, David G. Johnston wrote:
> On Thu, Mar 5, 2020 at 7:58 AM stan <stanb@panix.com> wrote:
> 
> > UPDATE BOM_ITEM SET  cost_per_unit = 23.45 , qty = 12345.00
> >
> > So, it appears that I need to create a WHERE clause for the resultant
> > statement. But I do not see how the function has enough data to use to
> > create this where clause.
> >
> > What am I missing, here?
> >
> >
> OLD and/or NEW?
> 
> https://www.postgresql.org/docs/12/plpgsql-trigger.html#PLPGSQL-DML-TRIGGER

Yes, I was thinking that might be what I had to do. My thinking right now
is to create a WHERE clause for the new statement, using (perhaps a subset)
of the columns returned by this.


-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin





view thread (3+ messages)

Message-ID: <20200305180516.GA28124@panix.com>
Permalink:  ../20200305180516.GA28124@panix.com/
Also on:    postgresql.org/message-id/20200305180516.GA28124@panix.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: stanb@panix.com, david.g.johnston@gmail.com
  Subject: Re: A question about the number of times a trigger will fire
  In-Reply-To: <20200305180516.GA28124@panix.com>
  References: <20200305145811.GA17538@panix.com> <CAKFQuwZA0ZEx7OehZ-26btGSwWxNmqeFUMc8Sz_PAAHUM1VM5A@mail.gmail.com> <20200305180516.GA28124@panix.com>

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

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