postgresql array last element code example Example: postgresql array last element arr[array_length(arr, 1)]