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 CAJvoCusMda4wDMge5VF9s_yPQsJF0aSaSuHF=Uvhc2szMf3BxQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Re: [HACKERS] GSoC 2017: Foreign Key Arrays
List pgsql-hackers
On Tue, Jul 18, 2017 at 11:14 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Why did we add an operator and not a support
procedure? 

I thought the support procedures were constant within an opclass. They implement the mandotary function required of an opclass. I don't see why we would need to implement new ones since they already deal with the lefthand operand which is the refrencing coloumn and is always an array so anyarray would suffice. 

Also the support procedure don't interact with the left and right operands simultanously. And we want to target the combinations of  int4[] @>> int8, int4[] @>> int4, int4[] @>> int2, int4[] @>> numeric.

So I think implementing operators is the way to go.

Best Regards,
Mark Rofail.

pgsql-hackers by date:

Previous
From: david.turon@linuxbox.cz
Date:
Subject: Re: [HACKERS] JSONB - JSONB operator feature request
Next
From: Mark Rofail
Date:
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays