Question

Is there such a thing as having a version on a function in oracle? - kind of like DLLs have versions.

The reason I want to do this, is if we release a new function to fix a bug, I'd like to be able to easily tell if a client is running with new function or not.

If not, then is there a solution to this besides giving a version? For example in the past we had renamed function to _v2 and changed code to call use new name - seems like an overkill.

Was it helpful?

Solution

You should generally have your functions within packages. In a package you can then have a function that returns the version of the package body:

SQL> select my_package.body_version ver from dual;

VER
---
1.3

Whenever you release a new version of the package, increment the version returned by this function. We do this automatically by getting our source control system (PVCS) to record its version number in the function definition.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top