Re: bytea bitwise logical operations implementation (xor / and / or / not)

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Christian Rossow <christian(dot)rossow(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: bytea bitwise logical operations implementation (xor / and / or / not)
Date: 2018-01-12 07:53:33
Message-ID: alpine.DEB.2.20.1801120832550.3820@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Christian,

> Currently, `bytea` does not have any bitwise logical operations yet.
> This issue came up in an old thread from 2006 [1], but nobody seemed to
> have picked this issue so far.

I remember this one because I needed them for checksuming set of rows.
There is a whole set of missing (from my point of view) operators, casts
and aggregates.

See https://github.com/zx80/pg_comparator where I packaged the subset I
needed as an extension. In particular, there is a bitxor which can be used
for bytea if casting is allowed.

> Tested on PG 9.6. I hope you find this useful.

I think that the probability of getting these useful things into pg is
alas small. In the mean time, you may package and register it as an
extension?

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-01-12 08:16:56 Re: [HACKERS] [PATCH] Improve geometric types
Previous Message Etsuro Fujita 2018-01-12 07:15:22 Re: [HACKERS] postgres_fdw bug in 9.6