From: Jason Stephenson Date: Wed, 12 Dec 2018 18:24:01 +0000 (-0500) Subject: Lp 1730726: Fix lp1501781-unaccent_and_squash.pg for PostgreSQL 9.6 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c656616431525e2bcb2f178ab0b3ae1739e742ac;p=contrib%2FConifer.git 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 --- 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