ip.rb Syntax Error global = 1 -> global = '1'

PostgreSQL supports an actual boolean datatype. MySQL usually uses one of its Number types.  Assuming the number 1 was used for true in MySQL, '1' is a true value in PostgreSQL. This appears to give the correct results.