Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Merlin Moncure
On Mon, Oct 15, 2012 at 8:44 AM, P. Broennimann wrote: > Thx for the feedback I will take a look. > > Here some details. Basically what I'd like to achieve: > > Internet <-> AppliA <-> PostgreSQL <-> AppliB > > 1) AppliA receives a request from the internet and calls a Pg/SQL function. > 2) The

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Sim Zacks
On 10/15/2012 02:54 PM, P. Broennimann wrote: Hi there 1) Can a Pg/SQL function "listen" for a notification sent from an external instance? I would like my stored function to pause/wait and continue its execution on

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Chris Travers
On Mon, Oct 15, 2012 at 6:44 AM, P. Broennimann wrote: > Thx for the feedback I will take a look. > > Here some details. Basically what I'd like to achieve: > > Internet <-> AppliA <-> PostgreSQL <-> AppliB > > 1) AppliA receives a request from the internet and calls a Pg/SQL function. > 2) The

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread P. Broennimann
Thx for the feedback I will take a look. Here some details. Basically what I'd like to achieve: Internet <-> AppliA <-> PostgreSQL <-> AppliB 1) AppliA receives a request from the internet and calls a Pg/SQL function. 2) The Pg/SQL function informs AppliB that there is some work waiting (NOTIF

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Craig Ringer
On 10/15/2012 08:54 PM, P. Broennimann wrote: Hi there 1) Can a Pg/SQL function "listen" for a notification sent from an external instance? No, it's the other way around. A client can `LISTEN` for a `NOTIFY` sent by another client, either directly or via a PL/PgSQL function. What you want i