{"repo":"petere/plsh","free":true,"listed":false,"github":"https://github.com/petere/plsh","clone":"git clone https://github.com/petere/plsh.git","description":"PL/sh is a procedural language handler for PostgreSQL that allows you to write stored procedures in a shell of your choice.","language":"C","stars":178,"topics":["postgresql","postgresql-extension","trigger","language","shell"],"license":null,"category":"databases-storage","readme_excerpt":"PL/sh Procedural Language Handler for PostgreSQL ================================================ PL/sh is a procedural language handler for PostgreSQL that allows you to write stored procedures in a shell of your choice. For example, CREATE FUNCTION concat(text, text) RETURNS text AS ' #!/bin/sh echo \"$1$2\" ' LANGUAGE plsh; The first line must be a #! -style line that indicates the shell to use. The rest of the function body will be executed by that shell in a separate process. The arguments are available as $1 , $2 , etc., as usual. (This is the shell's syntax. If your shell uses something different then that's what you need to use.) The return value will become what is printed to the standard output, with a newline stripped. If nothing is printed, a null value is returned. If anything is printed to the standard error, then the function aborts with an error and the message is printed. If the script does not exit with status 0 then an error is raised as well. The shell script can do anything you want, but you can't access the database directly. Trigger functions are also possible, but they can't change the rows. Needless to say, this language should not be declared as TRUSTED . The distribution also contains a test suite in the directory test/ , which contains a simplistic demonstration of the functionality. I'm interested if anyone is using this. Peter Eisentraut Database Access --------------- You can't access the database directly from PL/sh through something like SPI, bu","default_branch":null,"files":null,"tree":[],"storefront":"/r/petere","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/petere/plsh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}