postgres bitwise add permission Create the table CREATE TABLE test ( id serial PRIMARY KEY, perm INT NOT NULL ); Insert a new row INSERT INTO test (perm) VALUES(0); Bitwise add permission. UPDATE test SET perm = perm | 2 WHERE id = 1; Print the result SELECT * FROM test WHERE id = 1;