We have database table with the following columns, foo ------------------ name VARCHAR(20) bar NUMERIC(20,0) We were running version 7.2.1 until now. The following SQL used to work fine in 7.2.1, SELECT name FROM foo WHERE (bar & 64) <> 0; Now we upgraded to version 8.1.5 and getting the error, ERROR: operator does not exist: numeric & integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. NUMERIC(20,0) is probably not the best way to define a column to be used for bit arithmetic, but we cant change the column type because of legacy. Is there anyway I can get the existing SQL to work without any changes on the application side. Thanks,