Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4N3h-0005Ll-Jr for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 13:07:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4N3g-0008R7-EH for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 13:07:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4N3g-0008Qy-0F for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 13:07:28 +0000 Received: from sid.nimrod.no ([2001:8c0:9340:1::2]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4N3a-0003L2-EK for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 13:07:27 +0000 Received: from sid.nimrod.no (sid.nimrod.no [195.139.160.2]) by sid.nimrod.no (8.14.7/8.14.7) with ESMTP id 203D79VS014242; Mon, 3 Jan 2022 14:07:09 +0100 DKIM-Filter: OpenDKIM Filter v2.11.0 sid.nimrod.no 203D79VS014242 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nimrod.no; s=n20181209; t=1641215231; bh=nr4nkwU1uTpc9ewUDlT7c7MSwmlWGAzVr3K0uXKjBSs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=k3mUpQVOz1cckcLMef0F7UWhPsFGqTdBZOJyLxt99eqIVmkvE8onIGvK1SucMx95j yI8KquMK7ey/oyuWPvnBFIfpHxzUeySFP2V58/IOLpnw8MRavf/GvoH0A9S4SA5Fp4 /jfz0CkssTf1/ee9lYTYZq+OH4EfSN7Ysr4ySPqI8I/ctKw/+UgJ2C83vDpsDwIfMS 6EXo1LS8tNvjMK52YGVfAWo/npp5l6dgb3aWwY+LonQIecqozrh4pMIJcOWx4bexSp q93Hvi1L9eZwOXY61VEMyakUMyFBAC7XwKVKFHfwlJSZkABj5ZB0JSk0ceGmaI2iFL Le3CJ1/0f6lRw== From: Dag Lem To: Tom Lane Cc: Thomas Munro , Andres Freund , PostgreSQL Hackers Subject: Re: daitch_mokotoff module Organization: Nimrod References: <0cac2d60-5b85-59c6-1ac1-77092b8688b7@enterprisedb.com> <20220102213150.y2tpuwqhruu5t2y5@alap3.anarazel.de> <3461033.1641177713@sss.pgh.pa.us> Date: Mon, 03 Jan 2022 14:07:09 +0100 In-Reply-To: <3461033.1641177713@sss.pgh.pa.us> (Tom Lane's message of "Sun, 02 Jan 2022 21:41:53 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom Lane writes: > Thomas Munro writes: >> Erm, it looks like something weird is happening somewhere in cfbot's >> pipeline, because Dag's patch says: > >> +SELECT daitch_mokotoff('Stra=C3=9Fburg'); >> + daitch_mokotoff >> +----------------- >> + 294795 >> +(1 row) > > ... so, that test case is guaranteed to fail in non-UTF8 encodings, > I suppose? I wonder what the LANG environment is in that cfbot > instance. > > (We do have methods for dealing with non-ASCII test cases, but > I can't see that this patch is using any of them.) > > regards, tom lane > I naively assumed that tests would be run in an UTF8 environment. Running "ack -l '[\x80-\xff]'" in the contrib/ directory reveals that two other modules are using UTF8 characters in tests - citext and unaccent. The citext tests seem to be commented out - "Multibyte sanity tests. Uncomment to run." Looking into the unaccent module, I don't quite understand how it will work with various encodings, since it doesn't seem to decode its input - will it fail if run under anything but ASCII or UTF8? In any case, I see that unaccent.sql starts as follows: CREATE EXTENSION unaccent; -- must have a UTF8 database SELECT getdatabaseencoding(); SET client_encoding TO 'UTF8'; Would doing the same thing in fuzzystrmatch.sql fix the problem with failing tests? Should I prepare a new patch? Best regards Dag Lem