Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question on PLSQL
Jack (Jack_at_ss.com) wrote:
: >
: > It's only a problem if unwrapped source code gives away stuff you don't
: > want people to see.
: >
: > On the other hand, wrapping source can cause problems if you do not
: > also include standard version reporting functions in each package or
: > some equivalent method of determining what exactly is installed, and
: > you need to support it.
: >
: Is the 'version reporting functions' refering to some features of the PLSQL
: language?
No (at least I don't think so).
The following is completely untested, I have no examples with me right now. (At work I have one such routine liberally cut and pasted from project to project, but I haven't "looked" at it for just as long.)
Assuming you use something like RCS, and check your files in on occasion, then, in your source code add something like...
FUNCTION Version () IS VARCHAR
BEGIN RETURN
'$RCSfile:$ $Revision:$ ' || chr(10) || 'Defines in effect:' || chr(10) || 'EXAMPLE_DEF1: &EXAMPLE_DEF1.' || chr(10) || 'EXAMPLE_DEF2: &EXAMPLE_DEF2.' || chr(10) || ' etc etc ' || chr(10) || '-- end --' ;
sql> select my_package.version() from dual;
Perhaps there's something more elegant, but I have used that for years.
-- This space not for rent.Received on Sun Jul 10 2005 - 00:47:03 CDT
![]() |
![]() |