Function array_append

Source
fn array_append(
    left: Option<ListRef<'_>>,
    right: Option<ScalarRefImpl<'_>>,
    ctx: &Context,
) -> ListValue
Expand description

Appends a value as the back element of an array. The behavior is the same as PG.

Examples:

query T
select array_append(array[66], 123);
----
{66,123}

query T
select array_append(array[66], null::int);
----
{66,NULL}

query T
select array_append(null::int[], 233);
----
{233}

query T
select array_append(null::int[], null::int);
----
{NULL}