Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKSQn-0001QH-Rg for pgsql-sql@arkaria.postgresql.org; Sat, 27 Apr 2019 18:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hKSQl-0006hU-Go for pgsql-sql@arkaria.postgresql.org; Sat, 27 Apr 2019 18:52:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKSQl-0006gy-1f for pgsql-sql@lists.postgresql.org; Sat, 27 Apr 2019 18:52:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKSQd-0004WJ-Ok for pgsql-sql@lists.postgresql.org; Sat, 27 Apr 2019 18:52:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x3RIpviF028635; Sat, 27 Apr 2019 14:51:57 -0400 From: Tom Lane To: Axel Rau cc: pgsql-sql@lists.postgresql.org Subject: Re: Restrictions of channel arg of pg_notofy In-reply-to: <023C223F-4FC9-4E9E-A8C6-17F491358FA7@Chaos1.DE> References: <023C223F-4FC9-4E9E-A8C6-17F491358FA7@Chaos1.DE> Comments: In-reply-to Axel Rau message dated "Sat, 27 Apr 2019 19:51:46 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28633.1556391117.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 27 Apr 2019 14:51:57 -0400 Message-ID: <28634.1556391117@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Axel Rau writes: > Can the channel argument derived from the NEW pseudo arg of an INSERT TR= IGGER? > 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