Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/citext.sgml`
cb01ce6cb3f66e11be25a3c7990dce7809766a41294c936d00000001000008f7
 <para>
      <function>replace()</function>
    </para>
   </listitem>
   <listitem>
    <para>
      <function>split_part()</function>
    </para>
   </listitem>
   <listitem>
    <para>
      <function>strpos()</function>
    </para>
   </listitem>
   <listitem>
    <para>
      <function>translate()</function>
    </para>
   </listitem>
  </itemizedlist>

  <para>
   For the regexp functions, if you want to match case-sensitively, you can
   specify the <quote>c</quote> flag to force a case-sensitive match.  Otherwise,
   you must cast to <type>text</type> before using one of these functions if
   you want case-sensitive behavior.
  </para>

 </sect2>

 <sect2 id="citext-limitations">
  <title>Limitations</title>

   <itemizedlist>
    <listitem>
     <para>
      <type>citext</type>'s case-folding behavior depends on
      the <literal>LC_CTYPE</literal> setting of your database. How it compares
      values is therefore determined when the database is created.
      It is not truly
      case-insensitive in the terms defined by the Unicode standard.
      Effectively, what this means is that, as long as you're happy with your
      collation, you should be happy with <type>citext</type>'s comparisons. But
      if you have data in different languages stored in your database, users
      of one language may find their query results are not as expected if the
      collation is for another language.
     </para>
    </listitem>

    <listitem>
     <para>
      As of <productname>PostgreSQL</productname> 9.1, you can attach a
      <literal>COLLATE</literal> specification to <type>citext</type> columns or data
      values.  Currently, <type>citext</type> operators will honor a non-default
      <literal>COLLATE</literal> specification while comparing case-folded strings,
      but the initial folding to lower case is always done according to the
      database's <literal>LC_CTYPE</literal> setting (that is, as though
      <literal>COLLATE "default"</literal> were given).  This may be changed in a
      future release so that both steps follow the input <literal>COLLATE</literal>
      specification.
     </para>
    </listitem>

    <listitem>
     <para>
       <type>citext</type> is not as efficient as <type>text</type> because the
       operator

Title: citext Limitations and Case-Folding Behavior
Summary
The citext data type has limitations, including case-folding behavior that depends on the database's LC_CTYPE setting, potential issues with non-English languages, and reduced efficiency compared to the text data type, and its behavior may change in future releases to follow the input COLLATE specification.