Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I didn't see the presentation but it looked to me like the hate was really focused on the dev team structure that had DBAs owning all the sprocs. I've seen this on other teams I've worked with and it is indeed a nightmare.

For whatever it's worth, you shouldn't need sprocs for security; in fact, sprocs provide one more way for SQLI to sneak into your code (dynamic queries based on tainted input inside the procedure) --- something that comes up a lot when DBAs are forced to be a first line of defense against attacks.

There's nothing wrong with stored procedures per se, but the architecture where every database call is a stored procedure matched to a use case from a higher tier is error-prone. PL/pgSQL is not a great programming language.



> PL/pgSQL is not a great programming language.

Its main feature is that it resembles PL/SQL.

Otherwise, you can choose to write stored procedures in Ruby, Perl, Python, Lua, C, R ...

> There's nothing wrong with stored procedures per se, but the architecture where every database call is a stored procedure matched to a use case from a higher tier is error-prone.

Agreed in general; I prefer to use stored procs tactically. The worst stored proc architecture I've seen is the idea that every table should be wrapped in a stored proc API. It's hideous.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: