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 CAJvoCutVQ37Y=7Okme+3KpXi491uhdF4_bV-E3exmzpi8Jtr_w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: [HACKERS] GSoC 2017: Foreign Key Arrays
List pgsql-hackers


On Wed, Jan 31, 2018 at 1:52 AM, Andreas Karlsson <andreas@proxel.se> wrote:
I looked some at your anyarray @>> anyelement code and sadly it does not look like the index code could work. The issue I see is that ginqueryarrayextract() needs to make a copy of the search key but to do so it needs to know the type of anyelement (to know if it needs to detoast, etc). But there is as far as I can tell no way to check the type of anyelement in this context.

since its a polymorphic function it only passes if the `anyarray` is the same type of the `anyelement` so we are sure they are the same type. Can't we get the type from the anyarray ? the type is already stored in ` arr_type`.

Best Regards,
Mark Rofail

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Built-in connection pooling
Next
From: Robert Haas
Date:
Subject: Re: no partition pruning when partitioning using array type