Mega Code Archive
Shifting bit strings
postgres=# -- Shifting bit strings
postgres=#
postgres=# SELECT b'1000' >> 2 AS "8 shifted right", 8 >> 2 AS likewise;
8 shifted right | likewise
-----------------+----------
0010 | 2
(1 row)
postgres=#
postgres=#