Extension intarray and null values

From: Eric Brison <eric(dot)brison(at)anakeen(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Extension intarray and null values
Date: 2021-02-25 14:31:33
Message-ID: CA+GXEX_BoViVZ4Jho0vf47DoNT9rPBpoy+93X1GYJYK3eYD+rg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

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.
Because i have the error "ERROR: array must not contain nulls".

The documentation says that the standard operator "@>" is overrided by the
intarray extension when arguments are int[].

Do you have a solution, to rename the "@>(int{], int[])" to use it only
when it is possible and to prevent the override of the current behavior ?

Or if you know, how use the default @> operator instead of the override.

Thank you,
Eric.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rumpi Gravenstein 2021-02-25 14:44:43 Postgres Analog of Oracle APPEND hint
Previous Message Alexander Farber 2021-02-25 13:35:54 Re: Deleting takes days, should I add some index?