1 /* contrib/pg_trgm/pg_trgm--1.1--1.2.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION pg_trgm UPDATE TO '1.2'" to load this file. \quit
6 CREATE FUNCTION word_similarity(text,text)
9 LANGUAGE C STRICT IMMUTABLE;
11 CREATE FUNCTION word_similarity_op(text,text)
14 LANGUAGE C STRICT STABLE; -- stable because depends on pg_trgm.word_similarity_threshold
16 CREATE FUNCTION word_similarity_commutator_op(text,text)
19 LANGUAGE C STRICT STABLE; -- stable because depends on pg_trgm.word_similarity_threshold
21 CREATE FUNCTION word_similarity_dist_op(text,text)
24 LANGUAGE C STRICT IMMUTABLE;
26 CREATE FUNCTION word_similarity_dist_commutator_op(text,text)
29 LANGUAGE C STRICT IMMUTABLE;
34 PROCEDURE = word_similarity_op,
43 PROCEDURE = word_similarity_commutator_op,
49 CREATE OPERATOR <<-> (
52 PROCEDURE = word_similarity_dist_op,
56 CREATE OPERATOR <->> (
59 PROCEDURE = word_similarity_dist_commutator_op,
63 CREATE FUNCTION gin_trgm_triconsistent(internal, int2, text, int4, internal, internal, internal)
66 LANGUAGE C IMMUTABLE STRICT;
68 ALTER OPERATOR FAMILY gist_trgm_ops USING gist ADD
69 OPERATOR 7 %> (text, text),
70 OPERATOR 8 <->> (text, text) FOR ORDER BY pg_catalog.float_ops;
72 ALTER OPERATOR FAMILY gin_trgm_ops USING gin ADD
73 OPERATOR 7 %> (text, text),
74 FUNCTION 6 (text, text) gin_trgm_triconsistent (internal, int2, text, int4, internal, internal, internal);