From: | Tore Halvorsen <tore(dot)halvorsen(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: citext like query and index usage |
Date: | 2009-09-22 18:58:48 |
Message-ID: | 50e97fa70909221158h360a4abeoe1000d29a36fb41e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Sep 22, 2009 at 8:49 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Tore Halvorsen escribió:
>> Hi,
>>
>> Is it possible to use an index for like queries on a citext column?
>> I'm using pg 8.4.1 on windows - with no changes to the default configuration.
>>
>> For example:
>>
>> CREATE TABLE test ( citext citext NOT NULL );
>> INSERT INTO test select md5(random()::text) FROM generate_series(0, 1000000, 1);
>> CREATE INDEX test_citext_idx ON test USING btree(citext);
>
> Hmm, I think this needs one of the *_pattern_ops indexes. I'm not sure
> if you can use the builtin ones with citext though.
Yeah, I started looking at something like that - sadly after I sent my mail.
Looks like I'm stuck with lower(text_col) for now...
Thanks anyway :)
--
Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul]
<demo> 2009 Tore Halvorsen || +052 0553034554
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Barnes | 2009-09-22 18:58:58 | Logging statements longer than 1000ms doesn't appear to work |
Previous Message | Joshua D. Drake | 2009-09-22 18:52:13 | Re: PLJava not installed for PostgreSQL 8.4 on Solaris 10 x86 64 |