I'd like to know if there is a way to call a flat file (*.sh) from a procedure/function in a postgres database. Basically when a certain table gets a row inserted it should call the .sh script to run pg_dump to take a backup of this table and import it to another database.
Thanks.