Re: [patch] bit XOR aggregate functions

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
To: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: [patch] bit XOR aggregate functions
Date: 2021-03-05 12:42:55
Message-ID: 96775ca0-3fd3-605f-c6ef-448a3df5a151@imap.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Thanks for your reviews.
I've updated my patch to the current master and added a documentation
line suggesting using the new function as a checksum.

Best regards, Alex

On 04/03/2021 17:14, Ibrar Ahmed wrote:
>
>
> On Wed, Mar 3, 2021 at 7:30 PM Peter Eisentraut
> <peter(dot)eisentraut(at)enterprisedb(dot)com
> <mailto:peter(dot)eisentraut(at)enterprisedb(dot)com>> wrote:
>
> On 10.02.21 06:42, Kyotaro Horiguchi wrote:
> > We already had CREATE AGGREATE at the time, so BIT_XOR can be
> thought
> > as it falls into the same category with BIT_AND and BIT_OR, that is,
> > we may have BIT_XOR as an intrinsic aggregation?
>
> I think the use of BIT_XOR is quite separate from BIT_AND and BIT_OR.
> The latter give you an "all" or "any" result of the bits set. 
> BIT_XOR
> will return 1 or true if an odd number of inputs are 1 or true, which
> isn't useful by itself.  But it can be used as a checksum, so it
> seems
> pretty reasonable to me to add it.  Perhaps the use case could be
> pointed out in the documentation.
>
>
>
>
> Hi Alex,
>
> The patch is failing just because of a comment, which is already
> changed by another patch
>
> -/* Define to build with OpenSSL support. (--with-ssl=openssl) */
>
> +/* Define to 1 if you have OpenSSL support. */
>
>
> Do you mind sending an updated patch?
>
> http://cfbot.cputube.org/patch_32_2980.log.
>
> I am changing the status to "Waiting for Author"
>
>
> In my opinion that change no more requires so I removed that and
> attached the patch.
>
> --
> Ibrar Ahmed

Attachment Content-Type Size
bit-xor-agg-v003.diff text/x-patch 7.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message k.jamison@fujitsu.com 2021-03-05 12:56:25 RE: libpq debug log
Previous Message Joel Jacobson 2021-03-05 12:42:19 Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]