PostgreSQL WASM Extension
medium.com
medium.com
Of course, a postgres extension language really lives and dies by the amount of postgres functionality it actually exposes. pl/v8 scores particularly well here, exposing even more than pl/pgsql (allowing e.g. advanced window functions to be built). It would be amazing to be able to do this sort of thing without being restricted to JS.
It will also be interesting to see what happens when JITted extension languages like this start to meet in the middle with postgres' own nascent JITted query plan support as it grows...
Does Postgres actively measure the performance of stored procedures and use that for future cost estimates? I thought most of these timing stats are off by default.