From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: array_reverse() |
Date: | 2009-11-02 15:09:14 |
Message-ID: | 20091102150914.GJ5407@samason.me.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Nov 02, 2009 at 10:03:49AM -0500, Tom Lane wrote:
> Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> > 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.
Yes, it is. I hadn't worked out the code before. Implementation should
be very easy at C level. Not sure how NULLs are implemented in arrays,
they may require a bit more care.
--
Sam http://samason.me.uk/
From | Date | Subject | |
---|---|---|---|
Next Message | Raimon Fernandez | 2009-11-02 15:50:49 | Re: Cancelling Requests Frontend/Backend Protocol TCP/IP |
Previous Message | Sam Mason | 2009-11-02 15:06:48 | Re: array_reverse() |