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 once an external event (NOTIFY event) occurs.
2) In Pg/SQL I can implement a loop (until something happens) to pause/wait. This costs CPU time -> Is there another solution? Actually I would need something like a trigger to give my stored function the signal to continue.
Thx & cheers,
Peter