All,

I've been working on some scripts (for pgfoundry) which help in "cleaning up" databases which have TSearch and other contrib modules installed to schema public. However, I ran into this odd issue:

ERROR:  btree operators must return boolean
STATEMENT:  CREATE OPERATOR CLASS contrib.tsquery_ops
            DEFAULT FOR TYPE tsquery USING btree AS
            OPERATOR 1 <(tsquery,tsquery) ,
            OPERATOR 2 <=(tsquery,tsquery) ,
            OPERATOR 3 =(tsquery,tsquery) ,
            OPERATOR 4 >=(tsquery,tsquery) ,
            OPERATOR 5 >(tsquery,tsquery) ,
            FUNCTION 1 tsquery_cmp(tsquery,tsquery);

What appears to be happening there is that PG isn't finding the tsearch operators or is selecting the wrong operators. Manually changing the search_path to "contrib, public" instead of "public, contrib" fixes the issue, but it seems odd that create opclass can't find operators unless they're in the "first" schema in the path, when other CREATE statements have no such difficulty.

--Josh

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to