Custom text type for title text

Поиск
Список
Период
Сортировка
От Daniel Heath
Тема Custom text type for title text
Дата
Msg-id 47F5F943-BF6B-44BE-BC64-3F75F5A403F3@heath.cc
обсуждение исходный текст
Ответы Re: Custom text type for title text  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Re: Custom text type for title text  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Hi All,

I've frequently seen an issue in applications which store titles (eg of books, events, user profiles) where duplicate values are not properly vetted. 

The 'citext' type is helpful here, but I'd be keen to go further. 

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)

This would be useful for a range of situations where it's important to avoid entering duplicate values.

Given the discussion at https://www.postgresql.org/message-id/CAKFQuwY9u14TqG8Yzj%3DfAB0tydvvtK7ibgFEx3tegbPWsGjJpg%40mail.gmail.com I'd lean towards making this type not automatically coerce to text (to avoid surprising behaviour when comparing text to titletext).

Is a suitable patch likely to be accepted?

Thanks,

Daniel Heath

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Unified logging system for command-line programs
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Custom text type for title text