Attached is a patch that adds Postmodern support for asynchronous notifications, as documented here:
http://www.postgresql.org/docs/current/static/sql-listen.html
http://www.postgresql.org/docs/current/static/sql-notify.html
http://www.postgresql.org/docs/current/static/sql-unlisten.html
and
http://www.postgresql.org/docs/current/interactive/protocol-message-formats.... (under "NotificationResponse")
It updates MESSAGE-CASE to watch for async notifications and, by default, issue a warning that looks very similar to what the psql client displays for async notifications:
WARNING: Asynchornous notification "lisp" received from server process with PID 22063.
It also adds a blocking function, WAIT-FOR-NOTIFICATION, that adds a handler-bind around the warning and returns the notification data when a notification is received.
The patch isn't complete, though -- I wasn't sure how best to integrate the new public function, condition, and condition accessors into the documentation. How should I proceed?
Zach