Name

make_array — returns a new array

Synopsis

array make_array ( in length integer ,
  in content varchar );
 

Description

This returns an array of length elements with the content element type. The initial content of the array is undefined.

Parameters

length

Number of elements to be allocated in the resultant array.

content

String that specifies the data type of the array to make. Valid strings are 'float', 'double', 'long' or 'any'. These correspond respectively to the C types long (32 bit signed), float (IEEE 32-bit), double (IEEE 64-bit) and untyped. The untyped array may hold a heterogeneous collection of any Virtuoso data types, including other arrays. The initial content of the array is undefined.

Return Values

An array of specified length and data type

Errors

Parameter data type checking errors

Table 24.54. Errors signalled by make_array()

sqlstate error code error text
22003 SR021 make_array called with an invalid count <num>
22023 SR022 Type for make_array must be float, double, long or any