BIT Data Type - MySQL to PostgreSQL Migration

In MySQL and PostgreSQL, the BIT data type stores bit values. MySQL allows you to store up to 64 bits, while PostgreSQL does not have maximum length restrictions.

MySQL and PostgreSQL:

  -- Sample table 
  CREATE TABLE bits
  (
    c1 BIT,
    c2 BIT(3)
  );
 
  -- Sample data
  INSERT INTO bits VALUES (b'0', b'101');

For more information, see MySQL to PostgreSQL Migration.