suprisingly! index are started from 1 in pgpsql when it's about arrays!, I just realize it, while i was debuging a plpsql func
An more suprising stuff is about NULL
when accessing out-of-bound index of an array, well I was expecting errors!
with arr as(
select array[911,992]::int[] as arr
)
select arr[1] from arr /*returns 911*/
union all