I'd like to try to add a feature - guidance needed

From: Daniel Heath <daniel(at)heath(dot)cc>
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: I'd like to try to add a feature - guidance needed
Date: 2019-01-03 02:29:31
Message-ID: 71B2E620-FAAC-4DED-9348-BC42115F3A94@heath.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I'd be happy to submit a patch if this sounds like a desirable feature, but I'm not really clear on the right place / people to start the discussion. I'd appreciate any pointers people have as to 'the right forum' for this.

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 <https://www.postgresql.org/message-id/CAKFQuwY9u14TqG8Yzj=fAB0tydvvtK7ibgFEx3tegbPWsGjJpg@mail.gmail.com> I'd lean towards making this type not automatically coerce to text (to avoid surprising behaviour when comparing text to titletext)

Thanks,

Daniel Heath

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2019-01-03 05:03:35 Re: I'd like to try to add a feature - guidance needed
Previous Message Fabio Pardi 2018-12-28 19:48:48 Re: Using PostgreSQL to store URLs for a web crawler