Liten / Notify

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 10
Joined: Wed 27 Jun 2007 08:39

Liten / Notify

Post by jkucera » Thu 12 Jul 2007 17:27

Hi, I've seen the support for Listen/Notify is there since 3.00 version. Maybe I missed something but how the command LISTEN is implemented. The handling of notifications is implemented as PgSqlConnection event, but how to "subscribe" to listen?

Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 13 Jul 2007 10:17

You should execute PgSqlCommand with "listen" keyword. This will subscribe you to the event. When notification trigger in your database fires, you will get Notification event in PgSqlConnection. Note that asynchronous notifications are not supported yet, so you'll need to execute something to get notification event.

Post Reply