2010-09-22

Conditional Compilation patch level support

As I reported in a previous post the last oracle patch for 11g brings new features at least to a package.

Using conditional compilation we can test for an Oracle version and release using the DBMS_DB constants. For instance for testing if the oracle version is at least 11.2 you could use:


$IF (DBMS_DB_VERSION.version=11 AND DBMS_DB_VERSION.release>1)
OR DBMS_DB_VERSION.version>11 $then
<your code>
$END


But, there is no patch level (the called "4th digit") constant in DBMS_VERSION.
I.e. we only have access to the first and second "digit" in 11.2.0.2.

One workaround would be to create a user package which contains the value that test that value in the conditional compilation.
This would need you to do a manual process to update the value or you could
automate the update using the version number from v$version and creating the source.

No comments:

Post a Comment

Os comentários são moderados.
The comments are moderated.