pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #19425: Parametric settings in collation not working in rule syntax
2+ messages / 2 participants
[nested] [flat]
* BUG #19425: Parametric settings in collation not working in rule syntax
@ 2026-03-04 08:43 PG Bug reporting form <noreply@postgresql.org>
2026-03-05 11:34 ` Re: BUG #19425: Parametric settings in collation not working in rule syntax Daniel Verite <daniel@manitou-mail.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2026-03-04 08:43 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: dorian.752@live.fr
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:
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 = icu,
locale = 'und-u-ka-shifted-kc-false-ks-level1',
deterministic = 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 = icu,
locale = 'und-u-ka-shifted-kc-false-ks-level1',
deterministic = false,
rules = $$
& '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' = 'A' like this :
rules = $$
& 'p' < 'q'
& 'a' = '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 = icu,
locale = 'und',
deterministic = false,
rules = $$
[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-SETTINGS
https://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options
https://unicode-org.github.io/icu/userguide/collation/customization/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #19425: Parametric settings in collation not working in rule syntax
2026-03-04 08:43 BUG #19425: Parametric settings in collation not working in rule syntax PG Bug reporting form <noreply@postgresql.org>
@ 2026-03-05 11:34 ` Daniel Verite <daniel@manitou-mail.org>
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Verite @ 2026-03-05 11:34 UTC (permalink / raw)
To: dorian.752@live.fr; pgsql-bugs@lists.postgresql.org
PG Bug reporting form wrote:
> 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 = icu,
> locale = 'und-u-ka-shifted-kc-false-ks-level1',
> deterministic = false,
> rules = $$
> & 'p' < 'q'
> $$
> );
>
> But, and this is my problem, the previous request doesn't seem to work
> anymore. It doesn't return '1' :
This looks the same as bug #18771 discussed at
https://www.postgresql.org/message-id/flat/18771-98bb23e455b0f367%40postgresql.org
and
https://www.postgresql.org/message-id/spHSrzQa0K_-Sqq9rNK-d6kelbfJG-z4XP6vn8tliiCHmjNYy45g2QOD92mrsN...
There's a simple fix available at
https://commitfest.postgresql.org/patch/6084/
Hopefully it will make it into the next major release, but so far it has been
lacking
reviews.
If you're able to compile Postgres, you may test the fix with your case and
report on
the results.
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-03-05 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04 08:43 BUG #19425: Parametric settings in collation not working in rule syntax PG Bug reporting form <noreply@postgresql.org>
2026-03-05 11:34 ` Daniel Verite <daniel@manitou-mail.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox