Skip to content
This repository was archived by the owner on Apr 2, 2022. It is now read-only.

Changing LIKE queries to ILIKE to allow for case insensitive searching#12

Open
knightpfhor wants to merge 1 commit intosendgrid:masterfrom
knightpfhor:master
Open

Changing LIKE queries to ILIKE to allow for case insensitive searching#12
knightpfhor wants to merge 1 commit intosendgrid:masterfrom
knightpfhor:master

Conversation

@knightpfhor
Copy link

I've been caught out while copy/pasting email addresses and additional arguments not finding results because the source had a different case to how it had been passed to SendGrid in the first place. Using ILIKE instead of LIKE seems to solve the problem (even if it is unique to POSTGRESQL, I'm not sure if that's a problem for this project or not)

@SampsonCrowley
Copy link

ILIKE is not specific to postgres I'm pretty sure. And email itself is also supposed to be case insensitive. It might be better to specifically downcase all emails in the query, and create an index on it

@SampsonCrowley
Copy link

Either way searches shouldn't be case sensitive

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants