Design basics of user-defined functions

There are some basic considerations to keep in mind while developing UDFs.

This document assumes that the UDF developer is familiar with the basics of developing software, including good program design and development, independent testing, and so on.

In addition to standard software development practices, UDF developers should remember that they are developing code to be executed within the Sybase IQ database container, and to understand the limitations imposed by the database container.

Developers of aggregate UDFs should also be familiar with OLAP queries, and how they translate into UDF calling patterns.

Because the UDFs may be invoked by several threads simultaneously, they must be constructed to be thread-safe.

Sample code

Starting with Sybase IQ 15.1, sample UDF source code is delivered along with the product. The newest version of the sample code is always delivered with the most current version of Sybase IQ.

To see if there were last-minute changes to the sample UDF source code, see to the Sybase IQ Release Bulletin for the relevant release and operating system platform.

The sample UDF code documented in the User-Defined Functions Guide may not be the latest version as delivered with the Sybase IQ product. On UNIX platforms, the sample UDF code is in:

$SYBASE/IQ-15_1/samples/udf
(where $SYBASE is the installation root)

On Windows platforms, the sample UDF code is in:

C:\Documents and Settings\All Users\SybaseIQ\samples\udf