On Tue, Sep 05, 2017 at 08:19:13AM -0700, Steve Atkins wrote: > > On Sep 4, 2017, at 10:25 PM, Nico Williams <nico@xxxxxxxxxxxxxxxx> wrote: > > On Mon, Sep 4, 2017 at 4:21 PM Steve Atkins <steve@xxxxxxxxxxx> wrote: > > > https://github.com/wttw/pgsidekick [BTW, I must say I like pgsidekick, but for the use of the payload bit.] > > But the question i have is: how to get such functionality integrated > > into PostgreSQL? Is a standalone program (plus manpage plus > > Makefile changes) enough, or would a psql \wait command be better? > > There's not really any need to integrate it into postgresql at all. It > doesn't rely on any details of the core implementation - it's just a > normal SQL client, a pretty trivial one. It's a bit of an FAQ though, isn't it. I do think it odd that PG has this functionality on the server side and in the client-side API, but its client-side utility functionality for it is very limited. > (Whether psql could usefully be reworked to listen for activity on the > connection when it's not actively executing a query is another > question). A \wait would simply wait for notifications from the server. It would be interruptible by ^C, but it would not listen for input on stdin. I think that should be a simple-enough patch to psql. Nico -- -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general