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