Re: [HACKERS] GSoC 2017: Foreign Key Arrays - Mailing list pgsql-hackers

From Mark Rofail
Subject Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date
Msg-id CAJvoCutM5tyrAWJHywk6m_iMdvqYiZuq8pN-OQTYEfbkHC4U8Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
Hello Joel,

On Sun, Jan 24, 2021 at 12:11 PM Joel Jacobson <joel@compiler.org> wrote:
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.
QUERY:  SELECT 1 WHERE (SELECT pg_catalog.count(DISTINCT y) FROM pg_catalog.unnest($1) y) OPERATOR(pg_catalog.=) (SELECT pg_catalog.count(*) FROM (SELECT 1 FROM ONLY "catalog_clone"."pg_type" x WHERE $1 OPERATOR(pg_catalog. @>) ARRAY["oid"] FOR KEY SHARE OF x) z)

It seems to me there is some type conversion between oidvector and oid[] that isn't working properly?

This seems to be a type casting problem indeed. The coercion part of the patch found in "ruleutils.c:11438-11491" is the culprit, is there a cleaner way to achieve this?
I am aware of the problem and will try to fix it, but I assume this is because of "Array-containselem-gin-v1.patch" can you give the v13 patch a try alone?

I will work on a fix and send it soon.

/Mark 

pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Next
From: Andy Fan
Date:
Subject: Re: [PATCH] Keeps tracking the uniqueness with UniqueKey