On Tue, Oct 4, 2011 at 2:16 AM, Gavin Flower
wrote:
> On 01/10/11 01:23, Vitalii Tymchyshyn wrote:
>>
>> Since you are using except and not except all, you are not looking at
>> arrays with duplicates.
>> For this case next function what the fastest for me:
>>
>> create or replace function array_e
On 01/10/11 01:23, Vitalii Tymchyshyn wrote:
Since you are using except and not except all, you are not looking at
arrays with duplicates.
For this case next function what the fastest for me:
create or replace function array_except2(anyarray,anyarray) returns
anyarray as $$
select ARRAY(
(
sele
On Fri, Sep 30, 2011 at 2:12 PM, Merlin Moncure wrote:
>> FWIW, speaking as somebody who has no need of this function, "array_xor" is
>> a pretty clear name that indicates what's going to happen.
>
> +1 on this -- was going to suggest until you beat me to it. I also
> for the record really think
On Fri, Sep 30, 2011 at 3:15 PM, Ben Chobot wrote:
>
> On Sep 30, 2011, at 12:07 PM, bricklen wrote:
>
>> I've been informed that this type of operation is called "symmetric
>> difference"[1], and can be represented by A ∆ B. A couple of
>> alternative names were proposed, "array_symmetric_differ
On Sep 30, 2011, at 12:07 PM, bricklen wrote:
> I've been informed that this type of operation is called "symmetric
> difference"[1], and can be represented by A ∆ B. A couple of
> alternative names were proposed, "array_symmetric_difference" and
> "array_xor".
> Does anyone have a preference fo
On Fri, Sep 30, 2011 at 5:23 AM, Vitalii Tymchyshyn wrote:
> Since you are using except and not except all, you are not looking at arrays
> with duplicates.
> For this case next function what the fastest for me:
>
> create or replace function array_except2(anyarray,anyarray) returns
> anyarray as
On Fri, Sep 30, 2011 at 5:23 AM, Vitalii Tymchyshyn wrote:
> Since you are using except and not except all, you are not looking at arrays
> with duplicates.
> For this case next function what the fastest for me:
>
> create or replace function array_except2(anyarray,anyarray) returns
> anyarray as
Since you are using except and not except all, you are not looking at
arrays with duplicates.
For this case next function what the fastest for me:
create or replace function array_except2(anyarray,anyarray) returns
anyarray as $$
select ARRAY(
(
select r.elements
from(
(select 1,unne
On Thu, Sep 29, 2011 at 8:08 PM, Merlin Moncure wrote:
> *) Prefer union all to union
> *) prefer array constructor to array_agg when not grouping.
> *) perhaps consider not reusing 'except' name with different semantic
> meaning
>
> Well done
> merlin (on phone & in bed)
Hi Merlin,
Thanks for t
On Thursday, September 29, 2011, bricklen wrote:
> I recently had need of an "array_except" function but couldn't find
> any good/existing examples. Based off the neat "array_intersect"
> function at
http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Intersection_of_arrays
,
> I put together a
I recently had need of an "array_except" function but couldn't find
any good/existing examples. Based off the neat "array_intersect"
function at
http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Intersection_of_arrays,
I put together an "array_except" version to return the array elements
that
11 matches
Mail list logo