Questions tagged [bit-manipulation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
50 views

Can someone help me with the SQL Server syntax for the my Oracle query

Oracle version: CREATE OR replace PROCEDURE Item_reco_recordset (p_depositid IN NUMBER, p_b1 IN NUMBER, ...
1
vote
1answer
37 views

Posgres Row Security Policy - Why Array faster than Bitstring?

I have a question: I have two row security policies to restrict the access to a table. The first policy uses an Array-Column "rights". The "rights" column is type 16-bit bit/integer array and each ...
0
votes
0answers
55 views

PostgreSQL: double to bit conversion

I need bit(64) representation of current epoch (the operations I need should be much easier in bits), so SELECT extract('epoch' from CURRENT_TIMESTAMP)::bit(64) But this gives me ERROR: cannot cast ...
1
vote
1answer
168 views

Using a 512 bit binary column as a bit field

I'm designing a table to keep track of a value that has to represent the on-off setting of several hundred states. I would expand this to 512, to give room for future growth and be a power of two. So ...
2
votes
2answers
94 views

Bit column vs relationships?

Two examples: Table users, each user may have or not have some of ~10 possible permissions (like "can login, can post, can edit, can delete" etc). Table articles, each article may have or not have ...
0
votes
1answer
60 views

PostgreSQL extending a variable-width bit string type?

PostgreSQL supports Bit Strings, SELECT B'01010101', B'01010101', '01010101'::bit(8), X'CC'; ?column? | ?column? | bit | ?column? ----------+----------+----------+---------- 01010101 | ...
0
votes
1answer
282 views

MariaDB are bitwise operators defined on strings?

Is the behavior of BITAND, (bitwise and) defined in MariaDB over strings? SELECT '0011' & '0011', 'ff' & 'ff', 'yy' & 'YY', '5' & '5'; +-----------------+-------------+-------------+--...
5
votes
2answers
2k views

Hex and Binary Literals in MySQL / MariaDB?

Another question I have pertains to just the & over string types. This question is over the binary-string literals as constructed with B'' or X''. MariaDB supports binary and hex literals, ...