Re: Support for array_remove and array_replace functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>
Cc: Alex Hunsaker <badalex(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support for array_remove and array_replace functions
Date: 2012-07-11 15:54:50
Message-ID: 4960.1342022090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it> 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 supported. However,
that could be dealt with by decreeing that the *result* is
one-dimensional and of the necessary length, regardless of the
dimensionality of the input.

I'm not actually certain whether that's a better definition or not.
But one less error case seems like generally a good thing.
Comments?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2012-07-11 16:53:52 Re: Support for array_remove and array_replace functions
Previous Message Dimitri Fontaine 2012-07-11 15:19:01 Re: Synchronous Standalone Master Redoux