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

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Christian Rossow <christian(dot)rossow(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: bytea bitwise logical operations implementation (xor / and / or / not)
Date: 2018-01-21 22:33:38
Message-ID: CAMsr+YF1VF+irFeXJcGM=cQK1p-DSgnOyGzC_NEMfTfMga+QdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 January 2018 at 01:57, Christian Rossow <christian(dot)rossow(at)gmail(dot)com>
wrote:

> Hi Fabien,
>
> > 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?
> I aimed to close the asymmetry between bit vector operations (they also
> offer xor/and/etc.) and bytea operations. My code is more or less a 1:1
> copy of the corresponding bit vector operations (in fact, just a tiny
> bit easier, since bytea is byte-aligned, wheres bit vectors aren't).
>
> I just wanted to dump the code here, given that Tom suggested (in 2006)
> such an implementation might be a useful addition to bytea. But I won't
> feel offended in any way if the code won't be merged.
>

Seems like a good idea to me.

Conversion between bit varying and bytea would be a big help.

So would casts from bit varying or bytea <-> integer and other types.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-01-21 22:41:11 Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)
Previous Message Craig Ringer 2018-01-21 22:31:27 Re: pgbench - add \if support