NOTIFY/LISTEN in Postgresql

From: "P(dot) Broennimann" <peter(dot)broennimann(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: NOTIFY/LISTEN in Postgresql
Date: 2012-10-15 12:54:05
Message-ID: CACm4aU-eFNaDiYw9uH1n9VPgHN5SqseJ3HqsbgXd7-Cw++NF-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2012-10-15 13:26:12 Re: NOTIFY/LISTEN in Postgresql
Previous Message Wolfgang Keller 2012-10-15 12:38:43 SQL DATALINK (Re: Storing large files in multiple schemas: BLOB or BYTEA)