Download Creating User-Defined Routines and User-Defined Data

Transcript
Creating a User-Defined Cast . . . . . . . . . . . . . .
Choosing the Kind of User-Defined Cast . . . . . . . .
Choosing the Cast Mechanism . . . . . . . . . . . .
Defining the Direction of the Cast . . . . . . . . . . .
Dropping a Cast . . . . . . . . . . . . . . . . . .
Chapter 8
Creating User-Defined Aggregates
In This Chapter . . . . . . . . . . . . . .
Extending Existing Aggregates . . . . . . . .
Overloading Operators for Built-In Aggregates .
Extending an Aggregate . . . . . . . . .
Example of Extending a Built-In Aggregate. . .
Creating User-Defined Aggregates . . . . . . .
Support Functions . . . . . . . . . . .
Resolving the Support Functions . . . . . .
Support-Function States . . . . . . . . .
Using C or Java Support Functions . . . . .
Example of a User-Defined Aggregate . . . .
Managing Aggregates . . . . . . . . . . .
Parallel Execution of Aggregates . . . . . .
Privileges for User-Defined Aggregates . . . .
Aggregate Information in the System Catalog . .
Aggregate Information from the Command Line .
Dropping an Aggregate . . . . . . . . . . .
Chapter 9
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
8-3
8-4
8-4
8-5
8-6
8-6
8-7
8-11
8-11
8-12
8-14
8-18
8-18
8-18
8-19
8-19
8-19
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9-3
9-3
9-4
9-5
9-8
9-8
9-9
9-12
9-13
9-13
9-17
9-18
Creating an Opaque Data Type
In This Chapter . . . . . . . . . . . . . . .
Opaque Data Types . . . . . . . . . . . . .
The Internal Structure . . . . . . . . . . .
Support Functions . . . . . . . . . . . .
Advantages of Opaque Data Types . . . . . .
Creating an Opaque Data Type . . . . . . . . .
Creating the Internal Structure in C . . . . . .
Creating UDT-to-Java Mappings . . . . . . .
Writing and Registering the Support Functions . .
Registering the Opaque Data Type with the Database
Granting Privileges for an Opaque Data Type . . .
Creating SQL-Invoked Functions . . . . . . .
vi
7-5
7-6
7-7
7-10
7-12
Creating User-Defined Routines and User-Defined Data Types