Explore this snippet here.
There is no built-in function for reversing an array, but it is possible to construct one using the generate_subscripts
function:
with data as (select array[1, 2, 3, 4] as nums)
select
array(
select nums[i]
from generate_subscripts(nums, 1) as indices(i)
order by i desc
) as reversed
from data
PostgreSQL wiki https://wiki.postgresql.org/wiki/Array_reverse