PL/sh is a procedural language handler for PostgreSQL that allows you to write stored procedures in a shell of your choice.