by BeefWellington · 4y ago · 0 comments
It's always intriguing to me that no major database vendors have added support for Python, Javascript, Lua, et. al, for their expression and stored procedure definition languages. It would really make things more accessible than Transact-SQL[1], Oracle's P/SQL[2] or DB2's messy external procedure support.[3]
[1]: https://docs.microsoft.com/en-us/sql/t-sql/statements/create...
[2]: https://docs.oracle.com/cd/B19306_01/server.102/b14200/state...
[3]: https://www.ibm.com/docs/en/db2/11.5?topic=statements-create...
[1]: https://cloud.google.com/bigquery/docs/reference/standard-sq...
https://docs.aws.amazon.com/redshift/latest/dg/user-defined-...
Examples show Javascript execution.
I should have clarified in my original post but I'm envisioning more of: database server has a parser that understands python/javascript/c#/etc but projects a subset of library functions to avoid security dangers.
Essentially, expose the same functionality stored procedures already have but in a more accessible syntax.
What vendors mostly seem to have opted for is embedding the full language parsers directly into the database servers, which yields a lot of power and a lot of risk.