Ordering of arrays

From: Mike Martin <redtux1(at)gmail(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Ordering of arrays
Date: 2019-08-23 10:14:49
Message-ID: CAOwYNKb-E=r9hQj3YZDuYrWkok1Sg8WwGixdYSByoPXDn1vQ2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

A question about arrays.
Is iit possible to reverse an array array?
for example
regexp_split_to_array(/srv/progs/programs/Aliens/The_Aliens_1_ens_envsc2_envsc2.mp4,'('/|\.)'),
which splits on either / or . to extract fileparts

It would be useful to be able to have the array returned reversed, so
rather than having to use cardinality(array)-1 I have a reversed array and
say arr[1]
Also it seems impossible to get a reverse slice (returns null array)

thanks

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2019-08-23 11:53:45 Re: Ordering of arrays
Previous Message Mike Martin 2019-08-23 10:12:44 Ordering of arrays