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.
__asr64
__div64 __dtoll __dtoull __lsl64 __lsr64 __rem64 __udiv64 __urem64 _copysign _copysignf _ctype _d_add _d_div _d_dtof _d_dtoi _d_dtoll _d_dtou _d_dtoull _d_feq _d_fgt _d_fle _d_flt _d_fne _d_itod _d_lltod _d_mul _d_sub _d_ulltod _d_utod _f_add _f_div _f_feq _f_fge |
_f_fgt
_f_fle _f_flt _f_fne _f_ftod _f_ftoi _f_ftoll _f_ftou _f_ftoull _f_itof _f_lltof _f_mul _f_sub _f_ulltof _f_utof _fp_round _isinf _isnan _logb _logbf _nextafter _nextafterf _scalb a64l abs acos acosf asctime asctime_r asin asinf _ atan atan2 atan2f |
atanf
atof atoi atol bsearch calloc ceil ceilf clock cos cosf cosh coshf d_fge div drand48 ecvt erand48 erf erfc erfcf erff exp expf fabs fabsf fcvt floor floorf fmod fmodf free frexp frexpf |
gcvt
gettimeofday gmtime gmtime_r hcreate hdestroy hsearch hypot hypotf isalnum isalpha isascii iscntrl isdigit isgraph islower isnan isprint ispunct isspace isupper isxdigit j0 j1 jn jrand48 l64a labs lcong48 ldexp ldexpf ldiv lfind lgamma |
lgammaf
localeconv log rand_r log10 log10f logf lrand48 lsearch malloc mblen mbstowcs memchr memcmp memcpy memmove memset modf modff mrand48 nrand48 pow powf printf qsort rand realloc rint round roundf scalbln scalblnf scalbn scalbnf seed48 |
sin
sinf sinh sinhf snprintf sprintf sqrt sqrtf srand srand48 sscanf strcasecmp strcat strchr strcmp strcoll strcpy strcspn strdup strerror strlen strncasecmp strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtok_r strtol strtoul |
strxfrm
swab tan tanf tanh tanhf tdelete tfind time times toascii tolower toupper trunc truncf tsearch twalk vprintf vsnprintf vsprintf vsscanf wcstombs wctomb y0 y1 yn |
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.