Is Postgres Case Insensitive?

Is Postgres Case Insensitive?

PostgreSQL is a case-sensitive database by default, but provides various possibilities for performing case-insensitive operations and working with collations.

Are PostgreSQL queries case-sensitive?

It makes your SQL statements verbose, and you always have to remember to use lower on both the column and the query value. It won't use an index, unless you create a functional index using lower . If you declare a column as UNIQUE or PRIMARY KEY, the implicitly generated index is case-sensitive.

Why is Postgres case-sensitive?

This is because PostgreSQL is converting “Person to “person”, but there is no table called “person”. It is actually called “Person”.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.