Is there some mechanism in postgres that can fire off a shell script when a database record is written? I can write a script to just monitor the database and table but befor
Write a trigger function using PL/sh. That's what it's for.