Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7aDG-00000000UoZ-0kCT for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 15:09:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7aDF-00000001ynV-1uxD for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 15:09:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7aDF-00000001ynN-0gl9 for pgsql-hackers@lists.postgresql.org; Fri, 18 Sep 2026 15:09:17 +0000 Received: from mail-wm2-x11.google.com ([2a00:1450:4864:31::11]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x7aDC-000000002tv-3ygN for pgsql-hackers@postgresql.org; Fri, 18 Sep 2026 15:09:16 +0000 Received: by mail-wm2-x11.google.com with SMTP id 5b1f17b1804b1-49b912d8239so6526165e9.0 for ; Fri, 18 Sep 2026 08:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789744154; x=1790348954; darn=postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NpxKH9h3pmNNZxASiCbCJR4WjK3aOiDujhipy//OeQc=; b=VQheozEKa7HP5JF/huc4g50qHSCKkwnP1XQ+/6ODMwRcvW0OOF/rdK8c/MIX+aoMwH CDKfEmku6Zi/OR1Dqq21k5PPCS4C9IG3cqDbVpc/r1KIhLRqNEdobLfm61UeU6592AXr Z7GDAdEPnmtlZRGehjoaZK6rrQuNLMNYVPstTP/CX3Qw8QSFH9VuGXDigp9YMgud3dCk yMIQOW4kQ2RtMzCTFEaK7RikqvWp1Xq8kduh+4meqVDltIvjYlgIQDPG7xgCiXk8fL2I kZg2f/rAh+4jh8Lw4TIK7B9lGrQ7kJn7Fyh8YGbybir3wUNEJPXFAa/2NWVfnZREBKYF 3mtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789744154; x=1790348954; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=NpxKH9h3pmNNZxASiCbCJR4WjK3aOiDujhipy//OeQc=; b=EVhBe0aMFJBqxCW0dRkSTd/Ndw5X6P7VfREXRuTO6lPIgDFQUtHI08b8r91kRn55nh /oyd2xM7zf7Oazzn1hoDQwAitgvxilZcj1mtFtg7SFdbtEKasZBhCUJ2DxKamZWBHQBt 6dlzIGM0qFfYx9roFgAPq6+NbEONeCu/4/zm6hWW3d+m4Aqw+wiqeddH2FnjLE5y+8cx efJL2rO8c21BYgNdca4NvOsD6zF9XOPa0ceEG142oIf9hIWuYpbgeUjpbUss13Hp+2oT ARKVnH58ynoRzspYmviGNrmy/OkvBHmKaMDQCvBhWEGQuETvaqOxdjfW5TLrRONNlY/J T99A== X-Forwarded-Encrypted: i=1; AKwUvBwXxsMwMKNz/+9f3NlRhWImk/YqprCrXDDWcx+4bhj4zeaDTuvUpyR1GvyL0NE7kWXNn/Y1ggqD0CLHmmpp@postgresql.org X-Gm-Message-State: AFuF++mJ4jxGGu/R9VOpWwNK9Eg5Q4AhzMrj4sYYMUdbCVKLVOaa3meq oTLrLmgYY4Cg54ssJzsDWqr6ro3QU0u4bHAl4pcHmzq109Q0+77f/JFq X-Gm-Gg: AYBFou0qsyVzXvTqTyEkgHl3DTQ3uXEWkUttKR8heHcaMjEapIayIZEJe7YShC/5wFG F4/XlczRlz3qO2UHlr2NvFnF1bIgJu32hc2PqmBoVwvxP+jD/+xGE1/Rk7KUYUu/7c4Hgfawmrl COJbAOyX/uc9L2/+KZBNAztrDdD+a0g4C5E+Vj4jisMUHmvnVAOdRobCwXWCTozk2Ul8jiyjdOb wcBvYM8GXYzRPiSoF/xB3yFF0fciqvuWi9ogktC8b4zPEecasD+7vuGCKmEph3+fMx2zvAoxrwk X7epUZoOUOSshBfYkG0oL2e+8foBbtFNcRbL/m9dtt7+cIMUkNDG3e8YpESYxZfKVJnAxr8x8i7 Z8ysrM/hfA9AhT/UVx4wPelk1Nvq+E5ke9yWU05ZdpHXllwapd6sorghkfV5Gm5hzUtUfXrcl6/ 4WGj7wGaL5i7etUnZ3SXxJvBuhAGenTR6JSPfweqhEWSqkfOTEYr6eAezaAxIrkNre X-Received: by 2002:a05:600c:83c8:b0:49c:ff3c:973f with SMTP id 5b1f17b1804b1-49fc573f531mr36883005e9.24.1789744153955; Fri, 18 Sep 2026 08:09:13 -0700 (PDT) Received: from [100.64.0.1] ([165.225.26.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fc5748e56sm62602345e9.2.2026.09.18.08.09.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2026 08:09:12 -0700 (PDT) Message-ID: <40afd8a3-d22e-437f-8eec-94462a6960d2@gmail.com> Date: Fri, 18 Sep 2026 17:09:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Use correct collation in pg_trgm To: solai v Cc: Zsolt Parragi , Alexander Korotkov , pgsql-hackers , Heikki Linnakangas , Kirill Reshke References: <1981b5f0-7d06-4911-a231-23bbb6bf504c@gmail.com> <6f983adb-fd5d-4e0e-8400-513fbea304e0@gmail.com> <7ae842f2-779c-466e-841d-d11e419a9428@gmail.com> <27121a4c-2186-47ad-84c4-136b99413df1@gmail.com> <8e054492-3984-403e-a959-9b2a6a85f3eb@gmail.com> Content-Language: en-US From: David Geier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Solai! > I reviewed the v7 patch series and I tested the changes with a Turkish > ICU collation and verified that the collation is now correctly > propagated for both trigram lowercasing and word-boundary detection. > For the lowercasing changes, show_trgm('ISTANBUL' COLLATE "tr-x-icu") > now produces the same trigrams as show_trgm('ıstanbul' COLLATE > turkish), and: > > similarity('ıstanbul' COLLATE turkish, > 'ISTANBUL' COLLATE turkish) > > returns 1, whereas the unpatched behavior produced 0.5. > > I also tested the word-boundary handling using: helloıtestIworldİcode, > with both Turkish ICU and "C" collations. The generated trigrams > differ appropriately between the two collations, confirming that the > collation is being used while identifying word boundaries. I tested > the index paths as well. A GIN trigram index and a GiST trigram index > both work correctly for a query using the matching Turkish collation. > And also tested an explicitly "C"-collated LIKE query against the > Turkish-collated column with sequential scans disabled. The planner > did not use the Turkish trigram index and instead showed a disabled > sequential scan, which avoids using an index with an incompatible > collation. Finally, I ran the complete pg_trgm installcheck suite and > all 5 tests passed successfully. I then ran: git diff HEAD~2..HEAD > --check, which reported one minor formatting issue: > contrib/pg_trgm/sql/pg_trgm_collation.sql:29: new blank line at EOF. > This appears to be only a patch formatting issue. I have not modified > the contributor's patch for this; I am mentioning it here as a minor > review comment. > Other than the above minor formatting point, I did not find any > functional issues during my testing. Thanks for the thorough review. I think with that it's ready for committer. Marked accordingly in the commitfest app. -- David Geier