> I would instead queue messages (or suitable information about them) in> a table, and have a process outside PostgreSQL periodically poll for them
Why poll when you can wait?
http://www.postgresql.org/docs/8.2/interactive/sql-notify.html