NOTIFY/LISTEN in Postgresql - Mailing list pgsql-general

From P. Broennimann
Subject NOTIFY/LISTEN in Postgresql
Date
Msg-id CACm4aU-eFNaDiYw9uH1n9VPgHN5SqseJ3HqsbgXd7-Cw++NF-g@mail.gmail.com
Whole thread Raw
Responses Re: NOTIFY/LISTEN in Postgresql  (Craig Ringer <ringerc@ringerc.id.au>)
Re: NOTIFY/LISTEN in Postgresql  (Sim Zacks <sim@compulab.co.il>)
List pgsql-general
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 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

pgsql-general by date:

Previous
From: Wolfgang Keller
Date:
Subject: SQL DATALINK (Re: Storing large files in multiple schemas: BLOB or BYTEA)
Next
From: Craig Ringer
Date:
Subject: Re: NOTIFY/LISTEN in Postgresql