Re: Custom text type for title text - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Custom text type for title text
Date
Msg-id 79303b77-0572-ac1f-e4b1-7096b17036f5@2ndquadrant.com
Whole thread Raw
In response to Custom text type for title text  (Daniel Heath <daniel@heath.cc>)
List pgsql-hackers
On 03/01/2019 23:22, Daniel Heath wrote:
> I propose a 'titletext' type, which has the following properties when
> compared for equality:
>  * Case insensitivity (like 'citext')
>  * Only considers characters in [:alnum:] (that is, ignores spaces,
> punctuation, etc)

My work on insensitive/non-deterministic collations[0] might cover this.

[0]:
https://www.postgresql.org/message-id/flat/1ccc668f-4cbc-0bef-af67-450b47cdfee7%402ndquadrant.com

For example:

CREATE COLLATION yournamehere (provider = icu,
  locale = 'und-u-ks-level2-ka-shifted', deterministic = false);

(Roughly, ks-level2 means ignore case, ka-shifted means ignore punctuation.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Custom text type for title text
Next
From: Tomas Vondra
Date:
Subject: Re: Delay locking partitions during query execution