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 and independent testing.

In addition to standard software development practices, developers of non-Java UDFs should remember that they are developing code to be executed within the SAP 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

Sample UDF source code is delivered with the product. The newest version of the sample code is always delivered with the most current version of SAP Sybase IQ.

On UNIX platforms, the sample UDF code is in $SYBASE/IQ-16.0/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.

The sample UDF code documented in the User-Defined Functions guide may not be the latest version as delivered with the SAP Sybase IQ product. Last-minute changes to the sample UDF source code are documented in the Release Bulletin for your operating system platform.