Contrib: pqasyncnotifier.c -- a shell command client for LISTEN

Started by Nico Williamsalmost 9 years ago4 messages
#1Nico Williams
nico@cryptonector.com

psql(1) does not output notifications asynchronously, as it does not
check for them when idle. This makes it difficult to script handling of
NOTIFYs.

Attached is pqasyncnotifier.c, a simple command that allows one to
handle NOTIFYs asynchronously.

Cheers,

Nico
--

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Marko Tiikkaja
marko@joh.to
In reply to: Nico Williams (#1)
Re: Contrib: pqasyncnotifier.c -- a shell command client for LISTEN

On Tue, Jan 24, 2017 at 12:40 AM, Nico Williams <nico@cryptonector.com>
wrote:

psql(1) does not output notifications asynchronously, as it does not
check for them when idle. This makes it difficult to script handling of
NOTIFYs.

Attached is pqasyncnotifier.c, a simple command that allows one to
handle NOTIFYs asynchronously.

Did you forget the attachment?

.m

#3Nico Williams
nico@cryptonector.com
In reply to: Marko Tiikkaja (#2)
1 attachment(s)
Re: Contrib: pqasyncnotifier.c -- a shell command client for LISTEN

On Tue, Jan 24, 2017 at 12:48:49AM +0100, Marko Tiikkaja wrote:

Did you forget the attachment?

I guess I must have. Attached this time.

Attachments:

pqasyncnotifier.ctext/x-csrc; charset=us-asciiDownload
#4Nico Williams
nico@cryptonector.com
In reply to: Nico Williams (#3)
Re: Contrib: pqasyncnotifier.c -- a shell command client for LISTEN

I should also note that this is on github at
https://github.com/twosigma/postgresql-contrib

Nico
--

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers