INFORMIX DataBlade Developers Kit Tutorial

List of Exercises

Exercise 4: Creating Row Data Types, continued


2

Add the rciPoint data type.

Choose Edit Insert Row Type and enter the following information in the New Row Type wizard.

Row Type Property Value

Row type name

rciPoint

Inheritance

No parent row type

Columns

1. Name: x, type: double precision, cannot be NULL

2. Name: y, type: double precision, cannot be NULL

(It does not make sense for this data type to allow a NULL coordinate.)

Grant execute privileges

Grant usage privileges

Click Finish and then choose Project Save to save your project.


3

Add the rciDistance() routine.

Choose Edit Insert Routine and enter the following information in the New Routine wizard.

Routine Property Value

Routine Name (SQL)

rciDistance

Return type

double precision

Statement Local Variable

No

Arguments

1. Name: point1, Type: rciPoint, Default: none

2. Name: point2, Type: rciPoint, Default: none

Language

C

Options for how the database server calls this routine (page 5)

Only the Routine does not accept NULL arguments check box should be checked; uncheck the Routine may return inconsistent check box.

Routine Name (C)

rciDistance

Shared object path

Leave as default

Behavior of routines

Well-behaved

Special stack requirements

None

Cost

0

Related routines

None

Grant execute privileges

Grant execute privileges

Click Finish and then choose Project Save to save your project.


Copyright © 1998, Informix Software, Inc. All rights reserved.