C runtime library functions

In IBM® Netezza® releases before 5.0, user-defined functions supported a subset of the C runtime library functions within user-defined functions and aggregates, as described in the following table. These restrictions resulted from the Nucleus operating system that is used in the Rev 7 SPU environments for those releases. In these previous releases, the Netezza Linux® host supports a slightly larger subset of LIBC functions, but use care to avoid any functions that are outside the common subset listed in the following table.

In release 5.0 and later, SPUs use the Linux operating system, and therefore support the full standard C Library (LIBC) functions.

As a best practice, do not use the LC_* locale variables. If you set the LC_* locale environment variables on the Netezza host, the locale-aware functions might not return similar results when they run on the host and the SPUs. The Netezza host cannot communicate LC_* variable values to the SPUs, and the SPUs cannot interpret the LC* settings. Likewise, use caution to avoid the use of locale-aware functions such as strftime, strcoll, and string function.

UDFs and UDAs can also allocate memory with the malloc/free functions or new/delete operators. However, use caution to carefully consider the memory allocations and include the memory as part of the MAXIMUM MEMORY argument for the function or aggregate. Any function or aggregate that exceeds its MAXIMUM MEMORY setting can negatively affect the system performance.