title: How to make my postgresql database use a case insensitive collation?
body: <p>In several SO posts OP asked for an efficient way to search text columns in a case insensitive manner.</p>
  
  <p>As much as I could understand the most efficient way is to have a database with a case insensitive collation. In my case I am creating the database from scratch, so I have the perfect control on the DB collation. The only problem is that I have no idea how to define it and could not find any example of it.</p>
  
  <p>Please, show me how to create a database with case insensitive collation.</p>
  
  <p>I am using postgresql 9.2.4.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>The <code>CITEXT</code> extension is a good solution. However, it has some limitations, as explained in the documentation. I will certainly use it, if no better way exists.</p>
  
  <p>I would like to emphasize, that I wish <strong>ALL</strong> the string operations to be case insensitive. Using <code>CITEXT</code> for every <code>TEXT</code> field is one way. However, using a case insensitive collation would be the best, if at all possible.</p>
  
  <p>Now <a href="https://stackoverflow.com/users/562459/mike-sherrill-catcall">https://stackoverflow.com/users/562459/mike-sherrill-catcall</a> says that PostgreSQL uses whatever collations the underlying system exposes. I do not mind making the OS expose a case insensitive collation. The only problem I have no idea how to do it.</p>