From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jean Carlo Giambastiani Lopes <jean(dot)lopes(at)hotmail(dot)com(dot)br> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: citext on exclude using gist |
Date: | 2022-07-19 23:43:23 |
Message-ID: | 1539766.1658274203@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jean Carlo Giambastiani Lopes <jean(dot)lopes(at)hotmail(dot)com(dot)br> writes:
> I'm trying to use a citext column in the following manner without success:
> create extension btree_gist;
> create extension citext;
> create table my_table(
> foo citext,
> bar numrange,
> primary key (foo, bar),
> exclude using gist (foo with =, bar with &&)
> );
> is this possible? If so, what's wrong on this snippet?
btree_gist knows nothing of citext, so it's not providing any suitable
operator class.
(Code-wise it probably wouldn't be that hard to add, but I see no good way
to deal with the inter-extension connection other than to give btree_gist
a hard dependency on citext, which people wouldn't appreciate too much.)
You could fake it with
exclude using gist (lower(foo) with =, bar with &&)
which is surely conceptually ugly, but I think it gives compatible
semantics.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Imre Samu | 2022-07-19 23:48:44 | Re: postgis |
Previous Message | Jean Carlo Giambastiani Lopes | 2022-07-19 23:31:08 | citext on exclude using gist |