Re: array_except -- Find elements that are not common to both arrays

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: bricklen <bricklen(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: array_except -- Find elements that are not common to both arrays
Date: 2011-09-30 20:15:43
Message-ID: 531A6FA4-A1C1-459F-8B9E-217F9F39CB50@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


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 for the name? I assume that this
> function might potentially be used by others now that it is in the pg
> lists, so might as well give it an appropriate name now.
> Is this something that could be written in C to make it faster (I don't know C)

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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2011-09-30 21:12:07 Re: array_except -- Find elements that are not common to both arrays
Previous Message Tom Lane 2011-09-30 18:56:42 Re: Shortcutting too-large offsets?