The functions query_references() and query_visitors() build a query like:
Code: Select all
where (0 or (host like '%.google.%' and path like '/search'))
Because the "0" is given in plain format, PostgreSQL interprets the "0" as an integer, but the WHERE expects a boolean result. This problem can be avoided if PostgreSQL is allowed to assume the datatype:ERROR: argument of OR must be type boolean, not type integer
Code: Select all
where ('0' or (host like '%.google.%' and path like '/search'))
Voila.