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 1pkXiE-0003Kq-6V for pgsql-committers@arkaria.postgresql.org; Thu, 06 Apr 2023 22:04:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkXiB-0000K5-Fp for pgsql-committers@arkaria.postgresql.org; Thu, 06 Apr 2023 22:04:07 +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 1pkXiB-0000Jr-8j for pgsql-committers@lists.postgresql.org; Thu, 06 Apr 2023 22:04:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkXi9-0005QB-1B for pgsql-committers@lists.postgresql.org; Thu, 06 Apr 2023 22:04:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 336M41DK2810777; Thu, 6 Apr 2023 18:04:01 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix ts_headline() edge cases for empty query and empty search te In-reply-to: <2800993.1680817652@sss.pgh.pa.us> References: <20230406213813.uep7plg6lvcywujo@awork3.anarazel.de> <2800993.1680817652@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 06 Apr 2023 17:47:32 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2810775.1680818641.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 06 Apr 2023 18:04:01 -0400 Message-ID: <2810776.1680818641@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Andres Freund writes: >> On 2023-04-06 19:52:55 +0000, Tom Lane wrote: >>> Fix ts_headline() edge cases for empty query and empty search text. >> Unfortunately there appears to be some portability issue with this. Cau= ses a >> test output difference on macos. > Huh ... looking. It's not about macOS, it's about that build script using -DRANDOMIZE_ALLOCATED_MEMORY, which causes coerce_type() to call tsqueryin() twice. So you get the bleat twice. Ugh. I can work around it in these test cases by using to_tsquery() instead of just "''::tsquery", but maybe we should rethink something. regards, tom lane