ERROR: operator does not exist: smallint ~~ unknown LINE 4: ...ilike '%%' or editor_pub ilike '%%') and year_pub like '%%' ... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.