Re: operators and bit field

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: operators and bit field
Date: 2003-02-14 23:23:11
Message-ID: EB31KIIFNKVPSNSMSMFDZ522WLHLH1W.3e4d7a5f@cal-lab
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry,

'bit masks' === 'bit strings'

BTW, how are 'bit strings' stored and manipulated?

2/14/2003 2:29:48 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>Dennis Gearon <gearond(at)cvc(dot)net> writes:
>> I haven't seen what operators can be applied to bit masks.
>> In particular, I am looking to use binary AND:
>> I want to AND two bitmasks together and see:
>> A/ if the result has ANY bits set
>> B/ what bits are set in the results.
>
>Why don't you use bit strings, like the SQL spec authors intended?
>
>regression=# select b'10001' & b'01111';
> ?column?
>----------
> 00001
>(1 row)
>
>See types BIT(n) and BIT VARYING(n).
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-02-14 23:31:43 Re: pg_stat_user_tables
Previous Message Medi Montaseri 2003-02-14 22:57:06 pg_stat_user_tables