6 ms·
I don't get it. You have a source file. It has your store procedures and what not. You deploy it. You have the server startup load it. Done. What's the pr
by cryptonector 7y ago
I don't get it. You have a source file. It has your store procedures and what not. You deploy it. You have the server startup load it. Done.
What's the problem?
Well, you might complain that some schema changes are hard to make this way, and that's true, but for stored procedures it's straightforward, and even for other things you can manage and make the update atomic (though it'd be nicer to have better SQL language support for schema changes).
As with everything, you need to mind backwards compatibility. This is true for C, C++, Rust, Java, and SQL/PlPgSQL. There's nothing special about this case.
- ben509 7y ago> You have the server startup load it. We have to take down a production database to do this? Or do you mean the app server is going to do it, in which case how do you handle different app servers with different versions of the stored procedure? Especially if we're doing phased deployments?
- cryptonector 7y agoNo, you can load it at any time. Just write (and test) SQL that is safe to load for upgrading a schema.