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.96) (envelope-from ) id 1vxlNi-00H6we-31 for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Mar 2026 12:31:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxlNg-00CcjY-2i for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Mar 2026 12:31:13 +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.96) (envelope-from ) id 1vxhpu-00Bh5A-0y for pgsql-bugs@lists.postgresql.org; Wed, 04 Mar 2026 08:44:06 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxhpt-00000000LM9-03nI for pgsql-bugs@lists.postgresql.org; Wed, 04 Mar 2026 08:44:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=a9Th5TuCOIjvXkKzhBSgjcck6ISbPoS7cpskqXs2fzE=; b=NTtyEaS+i20BBGBTr+4tVHxj2x gNbsHnuBFJiOpk6kmnPqi/NvKf/CKzUFnm+RCy+b7dqd3qEVjQdmokl2cbd5B/djTDczV60YFtBdy fpqLpTjLXB67WoKbCB6+5XgNPCoXsmzQng8GgU9xsq3ztZCuMF1AGVI8x0oZcy4c5CD/q3jeDFhbk mzBzwLVQIAKNI7epDki8HM+41TaOGCzrNSnOObicvG0WOV6CaN0PieVg4u9iNbaZS2ogdxfz7hiri RNMkVHkaL0DxY77yt27rHC1HJ6ed8N3NR90DNe6vMBxJDH46/IAtbPsERaH7oACcLqmlGmLPSix8z We0fMlww==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vxhps-000Qcn-1N for pgsql-bugs@lists.postgresql.org; Wed, 04 Mar 2026 08:44:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxhpq-001l1r-0k for pgsql-bugs@lists.postgresql.org; Wed, 04 Mar 2026 08:44:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19425: Parametric settings in collation not working in rule syntax To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: dorian.752@live.fr Reply-To: dorian.752@live.fr, pgsql-bugs@lists.postgresql.org Date: Wed, 04 Mar 2026 08:43:13 +0000 Message-ID: <19425-58915e19dacd4f40@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19425 Logged by: Dorian Email address: dorian.752@live.fr PostgreSQL version: 18.3 Operating system: Windows Description: =20 Hello, I want to create a custom collation with settings and tailoring rules, but I ran into an issue. When I create a custom collation, I first used collation settings in the local, giving me something like this : CREATE COLLATION IF NOT EXISTS und_ci_ai1( provider =3D icu, locale =3D 'und-u-ka-shifted-kc-false-ks-level1', deterministic =3D false ); For instance, I can do this request and I will get the result '1' : SELECT 1 WHERE 'adm' LIKE 'Adm' COLLATE und_ci_ai1; But, I also want to add a tailoring rule. For the simplicity we will say that I want to add 'p < q' CREATE COLLATION IF NOT EXISTS und_ci_ai2( provider =3D icu, locale =3D 'und-u-ka-shifted-kc-false-ks-level1', deterministic =3D false, rules =3D $$ & 'p' < 'q' $$ ); But, and this is my problem, the previous request doesn't seem to work anymore. It doesn't return '1' : SELECT 1 WHERE 'adm' LIKE 'Adm' COLLATE und_ci_ai2; For this request to return '1', I have to add 'a' =3D 'A' like this : rules =3D $$ & 'p' < 'q' & 'a' =3D 'A' $$ I didn't see in the documentation that I can't use settings in locale AND tailoring rules at the same time. But just in case I tried to use parametric settings in the rules syntax. Unfortunately, it doesn't seem to work at all, the request still doesn't return '1' : CREATE COLLATION IF NOT EXISTS und_ci_ai3( provider =3D icu, locale =3D 'und', deterministic =3D false, rules =3D $$ [strength 1] [caseLevel off] $$ ); SELECT 1 WHERE 'adm' LIKE 'Adm' COLLATE und_ci_ai3; I hope I gave you all the infos you need. Thank you for your time. Here the documentations I used : https://www.postgresql.org/docs/current/collation.html#ICU-COLLATION-SETTIN= GS https://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options https://unicode-org.github.io/icu/userguide/collation/customization/