Re: [HACKERS] GSoC 2017: Foreign Key Arrays

From: Mark Rofail <markm(dot)rofail(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Joel Jacobson <joel(at)compiler(dot)org>, Zhihong Yu <zyu(at)yugabyte(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, David Steele <david(at)pgmasters(dot)net>, Erik Rijkers <er(at)xs4all(dot)nl>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date: 2021-02-05 15:27:21
Message-ID: CAJvoCusNjPVX=h7WVEUscTK6cBu-M1sCP6f+tR-jJMEcofAOqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
anyarray_anyelement_operators-v1.patch text/x-patch 28.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Rofail 2021-02-05 15:34:09 Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Previous Message Petr Jelinek 2021-02-05 15:10:36 Re: Single transaction in the tablesync worker?