> > The switch statement could probably be done in a different way, but
> > there doesn't seem to be any good examples of how to return anyitem. If
> > anyone have a better way, please let me know.
>
> Why do you need the switch statement at all? array->elements is already
> an array of Datums. Won't simply returning
> array->elements[array->i]
> work?
yea,. sorry,. worked it out shortly after posting this, but forgot to
repost.... so here it is... attached.
> The problem is:
> test=# select * from unnest('{1,2,3,4,5}'::int8[]);
> unnest
> ----------
> 25314880
> 25314888
> 25314896
> 25314904
> 25314912
> (5 rows)