From c656616431525e2bcb2f178ab0b3ae1739e742ac Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 12 Dec 2018 13:24:01 -0500 Subject: [PATCH 1/1] Lp 1730726: Fix lp1501781-unaccent_and_squash.pg for PostgreSQL 9.6 PostgreSQL 9.6 apparently exhibits the same behavior as Postgresql 10 when it comes the OE ligature in the unaccent function. We modify the test case to take that into account. Signed-off-by: Jason Stephenson Signed-off-by: Ben Shum --- Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg b/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg index 3238804344..2de74d699d 100644 --- a/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg +++ b/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg @@ -54,7 +54,7 @@ SELECT is(evergreen.unaccent_and_squash('El Niño'), 'elnino', 'Spanish "The Kid"'); SELECT is(evergreen.unaccent_and_squash('Œuvres'), - CASE WHEN regexp_replace(regexp_replace(version(),'\..+',''),'^PostgreSQL ','')::INT >= 10 THEN 'oeuvres' ELSE 'euvres' END, 'oe ligature'); + CASE WHEN substring(version() from '^PostgreSQL ([0-9]+\.[0-9]+)')::DECIMAL > 9.5 THEN 'oeuvres' ELSE 'euvres' END, 'oe ligature'); -- Punctuation Tests -- 2.43.2