Hacker News new | ask | show | jobs
by greglindahl 2432 days ago
Is there a database where you can write stored procedures in C or C++? Usually such languages can't segfault or buffer overflow.
3 comments

User defined functions[1] in MySQL are dynamic libraries which are loaded and then you attach a function name to. A common example might be a hashing function that you want the DB to understand.[2]

That said, I bet just about every database supports something similar (and postgres' equivalent has already been provided by a sibling comment).

1: https://dev.mysql.com/doc/refman/5.5/en/create-function-udf....

2: https://www.percona.com/doc/percona-server/LATEST/management...

Is there a database where you can write stored procedures in C or C++?

Most of them. SQL-like languages like Oracle's PL/SQL are preferred, not because of any security problems but simply because it's much easier, specially when working with data sets.