Restrictions on the array data type

It is important to note the restrictions on the array data type before you use it or when troubleshooting problems with their declaration or use.

The following restrictions apply to the array data type:
  • Use of the array data type in dynamic compound statements is not supported.
  • Use of the ARRAY_AGG function outside of SQL procedures is not supported.
  • Use of the UNNEST function outside of SQL procedures is not supported.
  • Use of parameters of the array data type in external procedures other than Java™ procedures is not supported.
  • The casting of an array to any data type other than a user-defined arrays data type is not supported.
  • The containment of elements of any data type other than that specified for the array is not supported.
  • The casting of an array with a cardinality larger than that of the target array is not supported.
  • The use of arrays as parameters or return types in methods is not supported.
  • The use of arrays as parameters or return types in sourced or template functions is not supported.
  • The use of arrays as parameters or return types in external scalar or external table functions is not supported.
  • The use of arrays as parameters or return types in SQL scalar functions, SQL table functions, or SQL row functions is not supported.
  • The assignment or casting of the result value of a TRIM_ARRAY function to any data type other than an array is not supported.
  • The assignment or casting of the result value of an ARRAY constructor or an ARRAY_AGG function to any data type other than an array is not supported.
  • The use of arrays with row type elements in autonomous routines is not supported, if any of the row fields belonging to the element type are arrays or other row types.
  • Direct referencing of elements within a nested array type is not permitted. The inner array must first be assigned to a temporary variable before any of its elements can be accessed.