5 ms·
Are stored procedures not something that people are using any more?
by mister_m 12y ago
Are stored procedures not something that people are using any more?
- woah 12y agoI don't understand, couldn't this also be useful for inputting said procedures?
- untog 12y agoI used to work on a system that require a stored procedure for every database call - it became very annoying. I understand that stored procedures used to be the only way to ensure a query was optimised, but that isn't the case these days.
- angersock 12y agoSo, we make heavy use of them for things like reporting and providing a clean interface to multiple different client programs and APIs. That said, I kind of view them as an anti-pattern unless you treat your development of functions and stored procedures as rigorously as you handle all the rest of your development. That means using proper migration tools, using versioning, and especially rigorous testing. Towards the testing end, we've found pgTAP to be extremely helpful: http://pgtap.org/documentation.html http://pgtap.org/documentation.html . I'd love to hear other folks feedback about their practices here.