Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question on PLSQL

Re: Question on PLSQL

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 9 Jul 2005 21:47:03 -0800
Message-ID: <42d0a847@news.victoria.tc.ca>


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 --'
	;

END Later, you can ask the package what it is

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US