Re: [GENERAL] Create Action for psql when NOTIFY Recieved - Mailing list pgsql-general

From Nico Williams
Subject Re: [GENERAL] Create Action for psql when NOTIFY Recieved
Date
Msg-id 20170904030237.GE3281@localhost
Whole thread Raw
In response to Re: [GENERAL] Create Action for psql when NOTIFY Recieved  (Nico Williams <nico@cryptonector.com>)
List pgsql-general
On Sun, Sep 03, 2017 at 05:37:57PM -0500, Nico Williams wrote:
> What would it take to have pqasyncnotifier [0] adopted by PostgreSQL?

Maybe it should be named pqasynclisterner.

A \wait command for psql could do the same thing.  I could probably
write such a patch at some point if there's interest, something like:

  \wait [[N] [statement]]

that waits for N NOTIFYies (or forever if N is -1), perhaps always
printing the payload, but with newlines escaped (or truncated at
newlines) to avoid needing options, and runs a statement if provided.

Nico
--


pgsql-general by date:

Previous
From: Nico Williams
Date:
Subject: Re: [GENERAL] Create Action for psql when NOTIFY Recieved
Next
From: "Stefan Wagner"
Date:
Subject: [GENERAL] Undefined Reference