sidwelle
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
Thanks for the help.
The 'lower' cmd didn't slow the query down as much as I thought it would.
Thanks
The 'lower' cmd didn't slow the query down as much as I thought it would.
Thanks
ASKER
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