When a new row is added to our Postgres database, I want to run a bash script. Is there any sort of system()
function in PostgreSQL that would allow me to do this?
To give more context, when a new row is created in the database, I need to make a new file containing information from that row on an external server via SSH.
An alternate solution would just be to have a cron job run every 5 minutes or so and check for new rows, but then it might not catch if someone deletes a row, and then adds a row.