Questions tagged [bit-manipulation]
The bit-manipulation tag has no usage guidance.
9
questions
1
vote
1
answer
82
views
How to manipulate an unicode string with bitwise operators?
I wish to encrypt an Unicode string by using bitwise operators from my client (Dart) app, and send it to my PostgreSQL server where a function will decrypt it by using bitwise operators. But I don't ...
0
votes
1
answer
188
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
1
answer
57
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
0
answers
206
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
1
answer
303
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
2
answers
132
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
1
answer
215
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
1
answer
547
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';
+-----------------+-------------+-------------+--...
6
votes
2
answers
4k
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,
...