I have a database with a lot of tables which contain many columns of type boolean. But my software doesn't support boolean as a datatype. Their support team told me that I should use numeric(1,0) instead of boolean, so I tried:
ALTER TABLE foo ALTER COLUMN bar TYPE numeric(1,0) USING bar::numeric(1,0)
I get an error: can't convert boolean into type numeric.
What can I do to replace the boolean columns with a numeric alternative and preserve the boolean behaviour? Can this numeric(1,0) thing even work?