Re: array_reverse()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: array_reverse()
Date: 2009-11-02 15:03:49
Message-ID: 24699.1257174229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> On Mon, Nov 02, 2009 at 09:20:38AM -0500, Tom Lane wrote:
>> What would it mean for a multi-dimensional array?

> Rotating the array by 180 degrees in every dimension would give the same
> answer for 1-dimensional arrays and give sensible answers for higher
> dimensional arrays.

The easy implementation at the C level would be to reverse the storage
order of the elements (and then do something-or-other with the dimension
info, in case the array isn't square). Your diagram suggests that this
might be the same thing as what you suggest, but I can't work it out for
lack of caffeine.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2009-11-02 15:04:41 Re: pk vs unique not null differences between 8.3.4 and 8.3.8
Previous Message Merlin Moncure 2009-11-02 14:55:20 Re: array_reverse()