@OpinionatedGeek yes, I thought of that as well! I don't know if you can LISTEN with a stored procedure that runs inside the PostgreSQL server, though.