Re: can't find data type CIText or CI_Text

From: Thom Brown <thom(at)linux(dot)com>
To: Heine Ferreira <heine(dot)ferreira(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can't find data type CIText or CI_Text
Date: 2012-01-16 20:19:33
Message-ID: CAA-aLv7-Etv=bk95KzPAUd+nV++tCJaS1=ObfraKKKu7Vi4Q+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16 January 2012 20:15, Heine Ferreira <heine(dot)ferreira(at)gmail(dot)com> wrote:
> Hi
>
> I was told by someone that in order to store text that isn't case sensitive
> in comparisons I must use CIText or CI_Text.
> I can't find the data type? Also is this  char or varchar data type? Can you
> create an index on this data type?

It's provided by a contrib module so not available by default. In
PostgreSQL 9.1 you can just run the following in whichever database
you wish it to be made available in:

CREATE EXTENSION citext;

If you're on 9.0 or below, you will need to run a script, the location
of which varies depending on your platform. See
http://www.postgresql.org/docs/9.0/static/contrib.html

Regards

Thom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-01-16 20:34:29 Re: psql - TYPE DEFINITION
Previous Message Heine Ferreira 2012-01-16 20:15:25 can't find data type CIText or CI_Text