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 CAJvoCusNjPVX=h7WVEUscTK6cBu-M1sCP6f+tR-jJMEcofAOqg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [HACKERS] GSoC 2017: Foreign Key Arrays
List pgsql-hackers
Hello Álvaro, 

Well, *I* think it makes sense to do it that way.  I said so three years
ago :-)
https://postgr.es/m/20180410135917.odjh5coa4cjatz5v@alvherre.pgsql
So this makes a lot of sense, let's do that. 
 
I wonder if it can usefully get cross-type
operators, i.e., @>>(bigint[],smallint) in some way?  Maybe the
"anycompatiblearray" thing can be used for that purpose?
It was easy to get @>> and <<@ accept cross-types thanks to your suggestion, but I opted to having the operators defined as follows to still be consistent with the GIN index since the index needs the first operant to be of type "anyarray"
@>>(anyarray, anycompatiblenonearray) and <<@(anycompatiblenonearray, anyarray)

Thanks a lot for your persistence, by the way.
Thank you for your words of encouragement, it was one of my deepest regrests to not seeing this though while in GSoC, hopefiully it gets commited this time around.

We will focus on getting the operator patch through first. Should I create a separate commitfest ticket? or the current one suffices?
https://commitfest.postgresql.org/32/2966/

Changelog (operator patch):
- v1 (compatible with current master 2021-02-05, commit c444472af5c202067a9ecb0ff8df7370fb1ea8f4)
    * add tests and documentation to array operators and gin index

/Mark
Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Single transaction in the tablesync worker?
Next
From: Mark Rofail
Date:
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays