PRAGMA RESTRICT_REFERENCES works the following way :
- it is a kind of "HINT" to the PL/SQL engine when you define a
function within a package. Use it in the specification part of the package.
- basically, this helps the PL/SQL engine to allow to use your
functions in plain SQL statements and triggers. As you know, legal functions
in SQL apart built-ins are those that do not modify the database (i.e no
update or insert statement) and do not modify the state of the package
(through a global variable for instance).
- thus, to use functions in statements, you shall define the 2
following pragma for this function : WNDS and WNPS (Write No Database State,
Write No Package State).
- I've been told this way of proceeding is deprecated in 8i, but I
haven't checked it out.
- you can also define pragmas for another purpose, like ensuring
thanks to the compiler that you didn't add some unwanted changes in you
proc/func. This is called "purity level".
- if you define stand-alone functions (i.e not declared in
packages), it works in SQL without pragma. If you don't do it in packages,
you'll get a run time error when running the SQL statement calling the
function.
Hope this helps.
Regards,
Frederic.
-----Original Message-----
From: Pavan [mailto:on_jobnoonspam_at_usa.net.invalid]
Sent: 26. januar 2000 15:23
To: comp.databases.oracle.server_at_list.deja.com
Subject: Restrict Pragma
Message from the Deja.com forum:
comp.databases.oracle.server
Your subscription is set to individual email delivery
Hi There
I have a small question to ask you. I don't know anything about
"Restrict Pragma" in Database Functions.
May I know when and where do we use this. If possible I would be more
than happy if stated with an example.
Thanks for that
Luv
Pavan
- Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
Deja.com: Before you buy.
http://www.deja.com/
http://www.deja.com/thread/%3C0146ce5a.56b9bd28%40usw-ex0107-043.remarq.com%
3E
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Feb 02 2000 - 09:00:07 CST