Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Marco Nenciarini writes: > Patch v3 attached. Applied with mostly-but-not-entirely cosmetic adjustments. I left array_remove throwing error for multi-dimensional arrays for the moment, because I realized that changing the dimensionality as I suggested would conflict with the optimization to retu

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Robert Haas
On Jul 11, 2012, at 11:53 AM, Alex Hunsaker wrote: > On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: >> Marco Nenciarini writes: >>> Patch v3 attached. >> >> I'm looking at this patch now. The restriction of array_remove to >> one-dimensional arrays seems a bit annoying. I see the difficulty

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Alex Hunsaker writes: > On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: >> I'm looking at this patch now. The restriction of array_remove to >> one-dimensional arrays seems a bit annoying. I see the difficulty: >> if the input is multi-dimensional then removing some elements could >> lead to a

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Alex Hunsaker
On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: > Marco Nenciarini writes: >> Patch v3 attached. > > I'm looking at this patch now. The restriction of array_remove to > one-dimensional arrays seems a bit annoying. I see the difficulty: > if the input is multi-dimensional then removing some ele

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Marco Nenciarini writes: > Patch v3 attached. I'm looking at this patch now. The restriction of array_remove to one-dimensional arrays seems a bit annoying. I see the difficulty: if the input is multi-dimensional then removing some elements could lead to a non-rectangular array, which isn't sup

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-01 Thread Alex Hunsaker
On Sat, Jun 30, 2012 at 3:28 PM, Marco Nenciarini wrote: > > On 30/06/2012 04:16, Alex Hunsaker wrote: > > > > Hi, I've been reviewing this patch. > > > > Good documentation, and regression tests. The code looked fine but I > > didn't care for the code duplication between array_replace and > > arr

Re: [HACKERS] Support for array_remove and array_replace functions

2012-06-30 Thread Marco Nenciarini
On 30/06/2012 04:16, Alex Hunsaker wrote: > > Hi, I've been reviewing this patch. > > Good documentation, and regression tests. The code looked fine but I > didn't care for the code duplication between array_replace and > array_remove so I merged those into a helper function, > array_replace_int

Re: [HACKERS] Support for array_remove and array_replace functions

2012-06-29 Thread Alex Hunsaker
On Thu, Jun 14, 2012 at 4:41 AM, Marco Nenciarini < marco.nenciar...@2ndquadrant.it> wrote: > Hi, > > following Gabriele's email regarding our previous patch on "Foreign > Key Arrays"[1], I am sending a subset of that patch which includes only > two array functions which will be needed in that pa

[HACKERS] Support for array_remove and array_replace functions

2012-06-14 Thread Marco Nenciarini
Hi, following Gabriele's email regarding our previous patch on "Foreign Key Arrays"[1], I am sending a subset of that patch which includes only two array functions which will be needed in that patch: array_remove (limited to single-dimensional arrays) and array_replace. The patch includes cha