How do you write a case insensitive query for both MySQL and Postgres?

The moral of this story is: Don’t use a different software stack for development and production. Never.

You’ll just end up with bugs which you can’t reproduce in dev; your testing will be worthless. Just don’t do it.

Using a different database engine is out of the question – there will be FAR more cases where it behaves differently than just LIKE (also, have you checked the collations in use by the databases? Are they identical in EVERY CASE? If not, you can forget ORDER BY on varchar columns working the same)

Leave a Comment