--
-- bittoint4/1
--
create or replace function bittoint4(
  bit varying
) returns int4 as $$

	begin 
    	    return "int4"($1);
	end;$$ language plpgsql;