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
