domain check constraint should also consider domain's collation

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: domain check constraint should also consider domain's collation
Date: 2025-07-14 08:24:03
Message-ID: CACJufxGpnsOWHmgQVSRidevZ-4obuaGXAuJES+9QvCYupT4q7g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

CREATE COLLATION case_insensitive (provider = icu, locale =
'@colStrength=secondary', deterministic = false);
SELECT 'a' = 'A' COLLATE case_insensitive;
CREATE DOMAIN d1 as text collate case_insensitive check (value <> 'a');
SELECT 'A'::d1;

``SELECT 'A'::d1`` should error out as domain check constraint not satisfied?

If so, attached is the POC trying to implement it.

Attachment Content-Type Size
v1-0001-CoerceToDomainValue-should-use-domain-s-collation.patch text/x-patch 5.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mankirat Singh 2025-07-14 08:24:48 Re: ABI Compliance Checker GSoC Project
Previous Message Alexander Kukushkin 2025-07-14 08:21:02 Re: Requested WAL segment xxx has already been removed