Hi Martin,
I create custom function signatures with a createdb/functions.sql script.
Now say that 20 projects are running Spinque release 1.2.3 (several Spinque releases can be based on the same official MonetDB release).
I make a new release 1.2.4, where my UDF signatures change.
By simply upgrading the existing MonetDB deployments, the script won't be loaded, so I will have old signatures for new implementations, possibly breaking everything.
I don't think it's fair to say that this should be handled by an application. It has to do with internal consistency. If I change an implementation, I should be able to change the signature as part of a MonetDB upgrade, it has nothing to do with applications. Just as MonetDB allows to upgrade from a previous release with incompatible catalog. In other words, now MonetDB is allowing me to break it.
I know it's not SQL standard. Still, many DB vendors have this, because it's useful.
What I did so far is to manually run that script on all 20 projects right after they are upgraded.
In a previous conversation in this channel, Sjoerd has made clear that there currently is no mechanism to run a SQL script at every MonetDB restart.
What I did recently is to tap in SQLinit() and add that possibility. For a quick PoC I did it for just the one script I need and hard-coded its name.
That works, because my script has lots of CREATE OR REPLACE FUNCTION. So every time they get recreated. I was hoping to avoid that recreation though, and that's why I was looking for conditional DDL. Then I can check the internal (Spinque) release and run recreate those functions only upon a release change.
Roberto