Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
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 interes

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
[I meant to send this to the list] On Mon, Aug 28, 2017 at 07:08:28PM -0400, Tom Lane wrote: > "David G. Johnston" writes: > > On Mon, Aug 28, 2017 at 1:28 PM, Jerry Regan < > > jerry.re...@concertoglobalresources.com> wrote: > >> My concern is how, after LISTENing in psql, I can tell it what to

Re: [GENERAL] Create Action for psql when NOTIFY Recieved

2017-09-03 Thread Nico Williams
My principal problem with psql(1) relative to NOTIFY/LISTEN is that psql(1) won't check for them until it has had some input on stdin. So it will appear to do nothing when it's idle, even if there millions of notifies for it to respond to! So I wrote a program to just LISTEN: https://github.com

Re: [GENERAL] Strange SQL result - any ideas.

2017-09-03 Thread Nico Williams
On Fri, Sep 01, 2017 at 11:08:32PM +0100, Paul Linehan wrote: > which is fine (note that the field "mary" is sorted correctly) but > I want "proper" JSON - i.e. with open and close square brackets > i.e. ([ - ]) before and after the fields! I don't know what that means. Do you mean that you want