Download Oracle Database PL/SQL User's Guide and Reference

Transcript
FORALL Support for Non-Consecutive Indexes
You can use the INDICES OF and VALUES OF clauses with the FORALL statement to
iterate over non-consecutive index values. For example, you can delete elements from
a nested table, and still use that nested table in a FORALL statement. See "Using the
FORALL Statement" on page 11-9.
New IEEE Floating-Point Types
New datatypes BINARY_FLOAT and BINARY_DOUBLE represent floating-point
numbers in IEEE 754 format. These types are useful for scientific computation where
you exchange data with other programs and languages that use the IEEE 754 standard
for floating-point. Because many computer systems support IEEE 754 floating-point
operations through native processor instructions, these types are efficient for intensive
computations involving floating-point data.
Support for these types includes numeric literals such as 1.0f and 3.141d, arithmetic
operations including square root and remainder, exception handling, and special
values such as not-a-number (NaN) and infinity.
The rules for overloading subprograms are enhanced, so that you can write math
libraries with different versions of the same function operating on PLS_INTEGER,
NUMBER, BINARY_FLOAT, and BINARY_DOUBLE parameters. See "PL/SQL Number
Types" on page 3-2.
Change to the BINARY_INTEGER Datatype
Staring with Oracle 10g release 1, the BINARY_INTEGER datatype was changed to be
identical to PLS_INTEGER so the datatypes can be used interchangeably. See
"BINARY_INTEGER Datatype" on page 3-2.
Prior to Oracle 10g release 1, PLS_INTEGER was more efficient
than BINARY_INTEGER, so you might prefer to use the
PLS_INTEGER datatype if your code will be run under older database
releases. However, the PLS_INTEGER datatype has a different
overflow behavior than the BINARY_INTEGER datatype in releases
prior to Oracle 10g release 1. Prior to Oracle 10g release 1, when a
calculation with two BINARY_INTEGER datatypes overflowed the
magnitude range of BINARY_INTEGER, the result was assigned to a
NUMBER datatype and no overflow exception was raised. See
"PLS_INTEGER Datatype" on page 3-4.
Note:
Improved Overloading
You can now overload subprograms that accept different kinds of numeric arguments,
to write math libraries with specialized versions of each subprogram for different
datatypes. See "Guidelines for Overloading with Numeric Types" on page 8-10.
Nested Table Enhancements
Nested tables defined in PL/SQL have many more operations than previously. You
can compare nested tables for equality, test whether an element is a member of a
nested table, test whether one nested table is a subset of another, perform set
operations such as union and intersection, and much more. See "Assigning
Collections" on page 5-12 and "Comparing Collections" on page 5-16.
xxvii