Re: operators and bit field - Mailing list pgsql-general

From Dennis Gearon
Subject Re: operators and bit field
Date
Msg-id EB31KIIFNKVPSNSMSMFDZ522WLHLH1W.3e4d7a5f@cal-lab
Whole thread Raw
In response to Re: operators and bit field  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@sss.pgh.pa.us> wrote:

>Dennis Gearon <gearond@cvc.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
>




pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: http://www.pgsql.com/advertising/ many Warning:
Next
From: Bruce Momjian
Date:
Subject: Re: pg_stat_user_tables