Also reformatted the code and minor bug fixed it
PostgreSQL has a clear distinction between integers and booleans, so it makes sense to draw a clear line.