Вы находитесь на странице: 1из 2

8/17/2014 RESTRICT_REFERENCES Pragma

http://oracle.su/docs/11g/appdev.112/e10472/restrictreferences_pragma.htm#i35854 1/2
Skip Headers
Oracle Database PL/SQL Language Reference
11g Release 2 (11.2)
Part Number E10472-05
Home Book
List
ContentsIndex Master
Index
Contact
Us
Previous Next
View PDF
RESTRICT_REFERENCES Pragma
Note:
The RESTRICT_REFERENCES pragma is deprecated. Oracle recommends using DETERMINISTIC and
PARALLEL_ENABLE (described in "Function") instead of RESTRICT_REFERENCES.
The RESTRICT_REFERENCES pragma asserts that a user-defined subprogram does not read or write database
tables or package variables.
Subprograms that read or write database tables or package variables are difficult to optimize, because any call to
the subprogram might produce different results or encounter errors.
Topics:
Syntax
Semantics
Usage
Syntax
restrict_references_pragma ::=
Description of the illustration restrict_references_pragma.gif
Semantics
subprogram_name
The name of a user-defined subprogram, typically a function.
If subprogram_name is overloaded, the pragma applies only to the most recent subprogram declaration.
DEFAULT
Specifies that the pragma applies to all subprograms in the package specification or ADT specification (including
the system-defined constructor for ADTs).
If you also declare the pragma for an individual subprogram, it overrides the DEFAULT pragma for that
subprogram.
RNDS
Asserts that the subprogram reads no database state (does not query database tables).
WNDS
Search
This book Entire library
Quick Lookup
Advanced Search Master Book List Master
Index Master Glossary Error Messages
Main Categories
Installation
Getting Started
Administration
Application Development
Grid Computing
High Availability
Data Warehousing
Content Management and Unstructured Data
Information Integration
Security
This Book
Oracle Database PL/SQL Language
Reference 11g Release 2 (11.2)
This Page
RESTRICT_REFERENCES Pragma
8/17/2014 RESTRICT_REFERENCES Pragma
http://oracle.su/docs/11g/appdev.112/e10472/restrictreferences_pragma.htm#i35854 2/2
Asserts that the subprogram writes no database state (does not modify tables).
RNPS
Asserts that the subprogram reads no package state (does not reference the values of packaged variables)
You cannot specify RNPS if the subprogram invokes the SQLCODE or SQLERRM function.
WNPS
Asserts that the subprogram writes no package state (does not change the values of packaged variables).
You cannot specify WNPS if the subprogram invokes the SQLCODE or SQLERRM function.
TRUST
Asserts that the subprogram can be trusted not to violate one or more rules.
When you specify TRUST, the subprogram body is not checked for violations of the constraints listed in the
pragma. The subprogram is trusted not to violate them. Skipping these checks can improve performance. TRUST
is needed for functions written in C or Java that are invoked from PL/SQL, since PL/SQL cannot verify them at
run time.
Usage
A RESTRICT_REFERENCES pragma can appear only in a package specification or ADT specification. Typically,
this pragma is specified for functions. If a function calls procedures, specify the pragma for those procedures also.
To invoke a subprogram from parallel queries, you must specify all four constraintsRNDS, WNDS, RNPS, and
WNPS. No constraint implies another.
Previous Next
Copyright 1996,
2009, Oracle and/or its affiliates. All rights reserved.
Legal Notices
Home Book
List
ContentsIndex Master
Index
Contact
Us

Вам также может понравиться