3 ms·
You can write your stored procedures in a number of scripting languages. Out of the box PostgreSQL supports Tcl [1], Perl [2] and Python [3]. There's also a gen
by pg314 10y ago
You can write your stored procedures in a number of scripting languages. Out of the box PostgreSQL supports Tcl [1], Perl [2] and Python [3]. There's also a general mechanism to register other languages [4].
On github I found [5], which is embeds Ruby in PostgreSQL. I haven't used it and don't know how mature it is.
Using the same scripting language in your stored procedures and application code might lessen the impedance mismatch. It doesn't solve testing, deployment/migrations and tooling.
[1] https://www.postgresql.org/docs/current/static/pltcl.html https://www.postgresql.org/docs/current/static/pltcl.html
[2] https://www.postgresql.org/docs/current/static/plperl.html https://www.postgresql.org/docs/current/static/plperl.html
[3] https://www.postgresql.org/docs/current/static/plpython.html https://www.postgresql.org/docs/current/static/plpython.html
[4] https://www.postgresql.org/docs/9.6/static/plhandler.html https://www.postgresql.org/docs/9.6/static/plhandler.html
[5] https://github.com/knu/postgresql-plruby https://github.com/knu/postgresql-plruby
- inopinatus 10y agoThat pl/ruby embedding is unmaintained for years and doesn't currently build. To me the most interesting current extension language is javascript, via PL/v8: http://pgxn.org/dist/plv8/doc/plv8.html http://pgxn.org/dist/plv8/doc/plv8.html - now you can have isomorphic code at all three tiers of your web stack.