Re: citext on exclude using gist

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jean Carlo Giambastiani Lopes <jean(dot)lopes(at)hotmail(dot)com(dot)br>, "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:49:57
Message-ID: CAKFQuwaGbD2pwByRwBrmtSHQ_VQzL+vGz9pJWbAjXkdShjHWFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 19, 2022 at 4:43 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> 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.)
>
>
I'd expect that creating a "btree_gist_citext" extension would provide a
pathway forward here. IIUC, it could even depend on the two extensions it
is expanding upon.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Millas 2022-07-20 03:07:24 Re: postgis
Previous Message Imre Samu 2022-07-19 23:48:44 Re: postgis