[postmodern-devel] PATCH: Add support for asynchronous notifications

Zach Beane xach at xach.com
Thu Apr 8 19:09:19 UTC 2010


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.html
  (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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: postmodern-notify.patch
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20100408/61423ce4/attachment.ksh>


More information about the postmodern-devel mailing list