Re: Extension intarray and null values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Brison <eric(dot)brison(at)anakeen(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Extension intarray and null values
Date: 2021-02-25 15:06:54
Message-ID: 108775.1614265614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Brison <eric(dot)brison(at)anakeen(dot)com> writes:
> I use tables with several "int[]" columns.
> I use the "@>" operator to filter my data.
> To increase speed , i install the "intarray" extension. Now queries are
> very fast with the specific indexes (i use "gin__int_ops").
> But, in few columns, i have null values in my intarray and i cannot use the
> "@>" operator.

Do you really need to use intarray, rather than the built-in gin array
indexing features?

Yeah, the intarray implementation is probably a shade faster, but it's
faster precisely because it doesn't handle cases like null entries.
If you're in need of that, my suggestion is to ditch intarray.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-02-25 15:09:28 Re: PostgreSQL URI
Previous Message Pavel Stehule 2021-02-25 15:03:07 Re: converting text to bytea