Home > Archive > Oracle certifications > March 2002 > Program Units question...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Program Units question...
odonata

2002-03-10, 7:48 pm

I am getting a little confused with using

pragma RESTRICT_REFERENCES

Is the restriction WNDS ALWAYS required?

Also, I am just not seeing how and where to use this. I realize it is used in a FUNCTION within a package body, but I think I am missing the point of it somewhere, besides that you can have anything within the package body that does an update. Or is that all to it?

Can someone please explain or provide a link detailing this topic more?

Thanks!
aneesh_bhatia

2002-03-10, 11:17 pm

quote:
Originally posted by odonata
I am getting a little confused with using

pragma RESTRICT_REFERENCES

Is the restriction WNDS ALWAYS required?

Also, I am just not seeing how and where to use this. I realize it is used in a FUNCTION within a package body, but I think I am missing the point of it somewhere, besides that you can have anything within the package body that does an update. Or is that all to it?

Can someone please explain or provide a link detailing this topic more?

Thanks!



odonata,

Here goes...

I am sure that you are aware there are restrictions placed on the package functions used in SQL, like:

INSERT, UPDATE, or DELETE are not allowed

Only local dunctions can update package

Remote functions cannot read or write remote package variables.

Functions that read or write package variables cannot use the parallel query option.

Calls to subprograms that break any of the above restrictions are not allowed.

Now what PRAGMA RESTRICT_REFERENCES does is:

Checks that the restrictions of using functions in SQL statements are not violated.

Allows packaged functions to be used in SQL statements

Verifies the purity of a function at compilation

**NOTE** PRAGMA RESTRICT_REFERENCES is NO LONGER REQUIRED FOR ORACLE 8i.

But if you are learning from a test perspective then you should know about it.

Yes, WNDS is mandatory, the others, WNPS, RNDS, RNPS are optional.

I hope this helps, any questions feel free to ask me via this forum.

Cheers!
odonata

2002-03-12, 2:07 pm

Thanks Aneesh,

That does clear a few things up
aneesh_bhatia

2002-03-12, 2:18 pm

quote:
Originally posted by odonata
Thanks Aneesh,

That does clear a few things up



Anytime!
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net