Re: [GENERAL] array_reverse()

2009-11-02 Thread Sam Mason
On Mon, Nov 02, 2009 at 10:03:49AM -0500, Tom Lane wrote: > Sam Mason 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 wo

Re: [GENERAL] array_reverse()

2009-11-02 Thread Sam Mason
On Mon, Nov 02, 2009 at 09:55:20AM -0500, Merlin Moncure wrote: > On Mon, Nov 2, 2009 at 9:51 AM, Sam Mason wrote: > > On Mon, Nov 02, 2009 at 09:20:38AM -0500, Tom Lane wrote: > >> Craig Ringer writes: > >> > Before I go ahead and try to write a decent quality version: is there > >> > any chance

Re: [GENERAL] array_reverse()

2009-11-02 Thread Tom Lane
Sam Mason 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

Re: [GENERAL] array_reverse()

2009-11-02 Thread Merlin Moncure
On Mon, Nov 2, 2009 at 9:51 AM, Sam Mason wrote: > On Mon, Nov 02, 2009 at 09:20:38AM -0500, Tom Lane wrote: >> Craig Ringer writes: >> > Before I go ahead and try to write a decent quality version: is there >> > any chance an array_reverse() function (in C) would be accepted into Pg >> > mainlin

Re: [GENERAL] array_reverse()

2009-11-02 Thread Sam Mason
On Mon, Nov 02, 2009 at 09:20:38AM -0500, Tom Lane wrote: > Craig Ringer writes: > > Before I go ahead and try to write a decent quality version: is there > > any chance an array_reverse() function (in C) would be accepted into Pg > > mainline? > > What would it mean for a multi-dimensional array

Re: [GENERAL] array_reverse()

2009-11-02 Thread Merlin Moncure
On Mon, Nov 2, 2009 at 9:20 AM, Tom Lane wrote: > Craig Ringer writes: >> Before I go ahead and try to write a decent quality version: is there >> any chance an array_reverse() function (in C) would be accepted into Pg >> mainline? > > What would it mean for a multi-dimensional array? Couple of

Re: [GENERAL] array_reverse()

2009-11-02 Thread Tom Lane
Craig Ringer writes: > Before I go ahead and try to write a decent quality version: is there > any chance an array_reverse() function (in C) would be accepted into Pg > mainline? What would it mean for a multi-dimensional array? regards, tom lane -- Sent via pgsql-gener

Re: [GENERAL] array_reverse()

2009-11-02 Thread Merlin Moncure
On Mon, Nov 2, 2009 at 1:49 AM, Craig Ringer wrote: > > Hi all > > Before I go ahead and try to write a decent quality version: is there > any chance an array_reverse() function (in C) would be accepted into Pg > mainline? If not, I probably won't bother cleaning up my current > awful-hack quality

[GENERAL] array_reverse()

2009-11-01 Thread Craig Ringer
Hi all Before I go ahead and try to write a decent quality version: is there any chance an array_reverse() function (in C) would be accepted into Pg mainline? If not, I probably won't bother cleaning up my current awful-hack quality module. It's a slow operation to perform in SQL or PL/PgSQL even