1

Is it possible to create a database or schema in PostgreSQL which is case insensitive?

Meaning below queries give me the same result.

Select * from "emp" where "name" = 'DEEpak' or Select * from "emp" where "name" = 'deepak'

I know I can achieve this by using query

Select * from "emp" where lower("name") = lower('deepak')

1 Answer 1

1

As superuser

CREATE EXTENSION citext;

Now define all text columns of your tables as type citext.

This type does case insensitive string comparison.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.