Re: GIN indexes on an = ANY(array) clause - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: GIN indexes on an = ANY(array) clause
Date
Msg-id d7c8e68c-32f8-0f76-7db0-de8d50791948@proxel.se
Whole thread Raw
In response to Re: GIN indexes on an = ANY(array) clause  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 3/13/19 5:38 PM, Tom Lane wrote:
> regression=# select amopopr::regoperator from pg_amop where amopfamily = 2745;
>          amopopr
> -----------------------
>   &&(anyarray,anyarray)
>   @>(anyarray,anyarray)
>   <@(anyarray,anyarray)
>   =(anyarray,anyarray)
> (4 rows)
> 
> and none of those are obviously related to the =(int4,int4) operator that
> is in the ScalarArrayOp.  The only way to get from point A to point B is
> to know very specifically that =(anyarray,anyarray) is related to any
> scalar-type btree equality operator, which is not the kind of thing the
> GIN AM ought to know either.

In the discussions for the patch for foreign keys from arrays[1] some 
people proposed add a new operator, <<@(anyelement,anyarray), to avoid 
having to construct left hand side arrays. Would that help here or does 
it still have the same issues?

1. 
https://www.postgresql.org/message-id/CAJvoCut7zELHnBSC8HrM6p-R6q-NiBN1STKhqnK5fPE-9%3DGq3g%40mail.gmail.com

Andreas


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [sqlsmith] Failed assertion at relnode.c
Next
From: Michael Banck
Date:
Subject: Re: Offline enabling/disabling of data checksums