Thread: case and accent insensitive

case and accent insensitive

From
MOISES ESPINOSA
Date:
Hi,

I need to reproduced the following Oracle functionality in PostgreSQL:

CREATE INDEX index_ciudad ON world.ciudad ((NLSSORT(NOMBRE29,'nls_sort=''GENERIC_BASELETTER''')));

I don't know how i could reproduced case insensitive and accent insensitive.

Is there any collate?

Thanks.

Re: case and accent insensitive

From
Andreas Kretschmer
Date:

Am 23.03.2018 um 23:04 schrieb MOISES ESPINOSA:
> I don't know how i could reproduced case insensitive and accent 
> insensitive.

Maybe you can use lower() for case insensitive or citext for the same 
(https://www.postgresql.org/docs/10/static/citext.html) and the 
unaccent-extension
for the accent insensitive 
(https://www.postgresql.org/docs/10/static/unaccent.html)

*untested*


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com