Re: Restrictions of channel arg of pg_notofy

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Axel Rau <Axel.Rau@Chaos1.DE>
Cc: pgsql-sql@lists.postgresql.org
Date: 2019-04-27T18:51:57Z
Lists: pgsql-sql
Axel Rau <Axel.Rau@Chaos1.DE> writes:
> Can the channel argument derived from the NEW pseudo arg of an INSERT TRIGGER?
> In the following trigger function, the
> 	PERFORM pg_notify(fac);
> does not work (LISTEN in psql shows no notification).

That should work.

I think more likely what you're running into is that the NOTIFY won't
be delivered until end of transaction?

			regards, tom lane