Re: bytea bitwise logical operations implementation (xor / and / or/ not) - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: bytea bitwise logical operations implementation (xor / and / or/ not)
Date
Msg-id alpine.DEB.2.20.1801120832550.3820@lancre
Whole thread Raw
In response to bytea bitwise logical operations implementation (xor / and / or /not)  (Christian Rossow <christian.rossow@gmail.com>)
Responses Re: bytea bitwise logical operations implementation (xor / and / or / not)
Re: bytea bitwise logical operations implementation (xor / and / or /not)
List 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.


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] postgres_fdw bug in 9.6
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] [PATCH] Improve geometric types