String comparision in PostgreSQL - Mailing list pgsql-general

From Nicola Cisternino
Subject String comparision in PostgreSQL
Date
Msg-id 503CD9DF.40808@tiscali.it
Whole thread Raw
Responses Re: String comparision in PostgreSQL  (Merlin Moncure <mmoncure@gmail.com>)
Re: String comparision in PostgreSQL  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
Hi all,
I'm valutating a complex porting of our application based on Sybase SqlAnywhere on PostgreSQL (I've love it ...) and I'd like to have your opinion about searching/ordering funcionality.
The problem is about string comparision.
MS Sql server, MySql, SqlAnywhere and other DB engine allow a simple definition of case sensitive/insensitive behavior using char, varchar and text field type.
In PostgreSQL I've already tried to use "citext", lower() function (applied to indexes, too ...), ILIKE an so on ..... but nothing really work as I need (poor performances ...) !!
My questions are:
1) Why PostgreSQL don't use COLLATE to manage case sensitive / insensitive comparision (I think it's the best and ANSI standard way ....) ?
2) Can I build a custom COLLATION (for example named: "NOCASE" ....) to apply to my DB objects ? What's the way (... some example ? ) ???

Thanks.
Best Regards.
Nicola.

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: using vars in ddl in procedure call
Next
From: Merlin Moncure
Date:
Subject: Re: String comparision in PostgreSQL