Re: bit|varbit #, xor operator

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bit|varbit #, xor operator
Date: 2016-10-17 16:07:20
Message-ID: 53e94f95-fe3f-d238-128d-d8b2d3f2a762@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/16/16 3:13 PM, Tom Lane wrote:
> As for counting bits in a bitstring, why do we have to make that an
> operator at all? Using a function would decrease the stress involved
> in choosing a name, and it's hard to believe that the requirement is
> so common that we need to shave a few keystrokes. But if you must have
> an operator there's not that much wrong with using prefix # for it.

Fair enough.

>> > Related to this I'd also like to add a boolean XOR operator as that's a
>> > relatively common request/question.
> We have boolean XOR; it's spelled "<>".

I always forget about that... though, it doesn't work for boolean arrays.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-10-17 16:29:15 Re: bit|varbit #, xor operator
Previous Message Magnus Hagander 2016-10-17 15:33:50 Re: [COMMITTERS] pgsql: Replace PostmasterRandom() with a stronger way of generating ran