From c28aa157b86f756d53f2a6b715e23ca56f219b4f Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 12 Dec 2017 14:59:27 +0300 Subject: [PATCH] Make pg_trgm tests independ from standard_conforming_string. Tests uses regular expression which contains backslash. --- contrib/pg_trgm/expected/pg_trgm.out | 3 +++ contrib/pg_trgm/sql/pg_trgm.sql | 4 ++++ 2 files changed, 7 insertions(+) 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'); -- 2.40.0