1/* contrib/bloom/bloom--1.0.sql */ 2 3-- complain if script is sourced in psql, rather than via CREATE EXTENSION 4\echo Use "CREATE EXTENSION bloom" to load this file. \quit 5 6CREATE FUNCTION blhandler(internal) 7RETURNS index_am_handler 8AS 'MODULE_PATHNAME' 9LANGUAGE C; 10 11-- Access method 12CREATE ACCESS METHOD bloom TYPE INDEX HANDLER blhandler; 13COMMENT ON ACCESS METHOD bloom IS 'bloom index access method'; 14 15-- Opclasses 16 17CREATE OPERATOR CLASS int4_ops 18DEFAULT FOR TYPE int4 USING bloom AS 19 OPERATOR 1 =(int4, int4), 20 FUNCTION 1 hashint4(int4); 21 22CREATE OPERATOR CLASS text_ops 23DEFAULT FOR TYPE text USING bloom AS 24 OPERATOR 1 =(text, text), 25 FUNCTION 1 hashtext(text); 26