Perform update and raise notice in Postgres Function I'm trying to add a notice (or something similar) to a function that is executed on update by a trigger in PostgreSQL 9.6 db. I want to let the user who edited the table that something happened.
I don't know is &quot;NOTICE&quot; is the proper RAISE (Why not &quot;INFO&quot;?).
The central question is: how I can add the raise notice argument after the update?
The problem can be, that level for messages is too high
so try this appproach


CREATE TABLE id ( &quot;id1&quot; INT)




INSERT INTO id VALUES (1)


1 rows affected




do
$$
declare
  newnumer int = 90;
begin
   
  UPDATE id SET id1 =  newnumer WHERE id1 = 1;
SET client_min_messages TO INFO;
  raise info   '&quot;NOTICE&quot; is the proper RAISE (Why not &quot;INFO&quot;?)' ;
        -- catch notification
      
end;
$$
language plpgsql;


✓




SELECT * FROM id;


| id1 |
| --: |
|  90 |


db&lt;&gt;fiddle here