4 ms·
SQL Server has some interesting features. It has a much better alternative to pgadmin. You can write stored procs in C#. I would use postgres for most tasks
by jayd16 7y ago
SQL Server has some interesting features. It has a much better alternative to pgadmin. You can write stored procs in C#. I would use postgres for most tasks but there are things unique to SQL Server.
- kbenson 7y ago> You can write stored procs in C#. It just occurred to me that Rust might be a really good fit for user defined functions in MySQL. I would never want to write in C or C++ myself, but with a nice crate that abstracts away and/or provides most the structures you might need to pass back and forth, I would be much more confident that if I got it compiling in Rust that it probably wouldn't blow up my database. I mean, I think that's one of the major benefits of using C# over C or C++. You're not likely to segfault or buffer overflow, etc.
- greglindahl 7y agoIs there a database where you can write stored procedures in C or C++? Usually such languages can't segfault or buffer overflow.
- cjoelrun 7y agohttps://www.postgresql.org/docs/current/xfunc-c.html https://www.postgresql.org/docs/current/xfunc-c.html
- kbenson 7y agoUser 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.html https://dev.mysql.com/doc/refman/5.5/en/create-function-udf.... 2: https://www.percona.com/doc/percona-server/LATEST/management/udf_percona_toolkit.html https://www.percona.com/doc/percona-server/LATEST/management...
- narag 7y agoIs 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.
- deleted 7y ago[deleted]
- cjoelrun 7y agoYou can write postgres functions in c, python, tcl, and perl. https://www.postgresql.org/docs/current/xplang.html https://www.postgresql.org/docs/current/xplang.html
- bluejekyll 7y agoAnd Rust (warning self-promotion) https://github.com/bluejekyll/pg-extend-rs https://github.com/bluejekyll/pg-extend-rs