From: | Rene Romero Benavides <rene(dot)romero(dot)b(at)gmail(dot)com> |
---|---|
To: | Mike Martin <mike(at)redtux(dot)plus(dot)com> |
Cc: | pgsql-sql(at)lists(dot)postgresql(dot)org |
Subject: | Re: For each statement trigger and update table |
Date: | 2020-01-03 23:39:18 |
Message-ID: | CANaGW0-O3E0Pq5TnkWcobyH59YwPvVq7JMf=s75b2NeoWcra+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> I can give code when I get home, but it's pretty simple stuff
please do so, along with your trigger definition. Are you aware that you
can define your update trigger to fire on a specific column?
https://www.postgresql.org/docs/current/sql-createtrigger.html
For UPDATE events, it is possible to specify a list of columns using this
syntax:
UPDATE OF column_name1 [, column_name2 ... ]
On Fri, Jan 3, 2020 at 5:21 PM Mike Martin <mike(at)redtux(dot)plus(dot)com> wrote:
> Not sure if this is possible
> Basically I want to have a trigger which updates an array column in the
> same table when a column is updated
> This works as a row level trigger, but not as per statement
> I have hit the recursive issue (where update fires update trigger which
> fires etc)
> According to the docs I cannot use columns and relative tables together
>
> So any suggestions? I can give code when I get home, but it's pretty
> simple stuff
>
--
El genio es 1% inspiración y 99% transpiración.
Thomas Alva Edison
http://pglearn.blogspot.mx/
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Martin | 2020-01-03 23:55:18 | Re: For each statement trigger and update table |
Previous Message | Mike Martin | 2020-01-03 23:09:23 | For each statement trigger and update table |