Creating views and triggers on the fly does sound like insanity. There's got to be a better way.
That said, thanks for pointing this out - it looks like yet another very useful PG feature!
edit: thanks for the link to logical decoding, looks very useful.
I would love to see a pull request for the "proper way." Thank you for your help.
Events can be triggered directly in PG using an extension for AMQP or something, or in a standalone service, using whatever you can dream up.