PostgreSQL and NOTIFY & LISTEN

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
minihold
Posts: 3
Joined: Wed Jul 12, 2006 6:19 am

PostgreSQL and NOTIFY & LISTEN

Post by minihold » Mon Dec 14, 2009 12:13 pm

Is it possible in Revolution to LISTEN on notifications sent by the PostgreSQL database asynchronously?
I want to subscribe (LISTEN) with my client to messages sent after e.g. inserts into a specific table.
To active that, you create a rule on a table in postgresql:
CREATE RULE loginsert AS ON INSERT TO logmessages DO (NOTIFY loginsert);
For receiving this notification you have to use a LISTEN a command.
The notification mechanism is very useful to avoid polling a database table in defined time periods with SELECTs.

Thx in advance for answers,
Markus

Post Reply