"Adventures in distributed programming with Scheme and PostgreSQL". A 5 minute lightning talk I gave at PGCon 2018 in Ottawa. This describes some hobbyist hacking. The code describes is very incomplete and a work in progress...
What problem could I actually solve with PL/Scheme anyway…? We have PL/Scheme!? commit 2440c442d167d9d081a3e69c4fa78f3b6f8932e9 Author: Peter Eisentraut Date: Mon Jun 12 22:34:04 2017 -0400 doc: Update external PL list Add PL/Lua, PL/v8. Remove stale/unmaintained PL/PHP, PL/Py, PL/Ruby, PL/Scheme. Reported-by: Adam Sah We lost PL/Scheme!?
Code push-down (remote (user-id) (string-append “Hello there, ” (query-single “SELECT …” user-id) “. Today’s top story is: ” (query-single “SELECT …”))) • Blocks of code transferred to run inside the database, compiled and cached for reuse
• Named variables, return values, exceptions transferred (remote (x y) (query “UPDATE foo SET x = x + $1” x) (query “UPDATE bar SET x = x + $1” y) (query “UPDATE baz SET x = x + $1” (+ x y)))