Link to home
Start Free TrialLog in
Avatar of sidwelle
sidwelleFlag for United States of America

asked on

Case insensitive Select from PostgresSQL

I want to perform a text search on my Postgress table and I want the search to be case -Insensitive.

I have seen some examples of case-insensitive searches using the UPPER or LOWER command, but this would consume a lot of resources.
Doesn't Postgress have option for the SELECT cmd to ignore text case ?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sidwelle

ASKER

The DB belongs to an application that we have in house. I don't have the option to change or add anything, only query.

Using 'Lower' worked, just didn't think it was the best solution.
I just thought the postgress would have had a built in option to query case insensitive.

Thanks
If you cannot create an index, then I would look at ILIKE or regular expressions.  Those can be found here.  However, I don't think there is going to be much of a performance difference with using LOWER, but you can try.
Thanks for the help.

The 'lower' cmd didn't slow the query down as much as I thought it would.

Thanks