plv8

Can plv8 JavaScript language extension call 3rd party libraries?

谁说我不能喝 提交于 2019-11-29 10:59:20
In Postgresql, I want to call 3rd party libraries like moment.js or AWS lambda JS Client to invoke serverless functions from within the DB. I don't see any docs or examples how to do so: https://github.com/plv8/plv8/blob/master/README.md Is this possible and where can I find examples of how to 'import' or 'require' additional libraries? klin The plv8 language is trusted so there is no way to load anything from the file system. However you can load modules from the database. Create a table with source code of a module and load it using select and eval() . A simple example to illustrate the idea