From: Teodor Sigaev Date: Tue, 12 Dec 2017 11:59:27 +0000 (+0300) Subject: Make pg_trgm tests independ from standard_conforming_string. Tests uses X-Git-Tag: REL_11_BETA1~1087 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c28aa157b86f756d53f2a6b715e23ca56f219b4f;p=postgresql Make pg_trgm tests independ from standard_conforming_string. Tests uses regular expression which contains backslash. --- diff --git a/contrib/pg_trgm/expected/pg_trgm.out b/contrib/pg_trgm/expected/pg_trgm.out index c3304b0ceb..6efc54356a 100644 --- a/contrib/pg_trgm/expected/pg_trgm.out +++ b/contrib/pg_trgm/expected/pg_trgm.out @@ -7,6 +7,9 @@ WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid); --------+--------- (0 rows) +--backslash is used in tests below, installcheck will fail if +--standard_conforming_string is off +set standard_conforming_strings=on; select show_trgm(''); show_trgm ----------- diff --git a/contrib/pg_trgm/sql/pg_trgm.sql b/contrib/pg_trgm/sql/pg_trgm.sql index fe8d0a7495..96ae542320 100644 --- a/contrib/pg_trgm/sql/pg_trgm.sql +++ b/contrib/pg_trgm/sql/pg_trgm.sql @@ -5,6 +5,10 @@ SELECT amname, opcname FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid); +--backslash is used in tests below, installcheck will fail if +--standard_conforming_string is off +set standard_conforming_strings=on; + select show_trgm(''); select show_trgm('(*&^$@%@'); select show_trgm('a b c');