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: 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>, Joel Jacobson <joel(at)compiler(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, 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>, Zhihong Yu <zyu(at)yugabyte(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date: 2021-03-27 20:21:29
Message-ID: CAJvoCuswKzt3XYEoxigoY+j=vVBH2Ry17emEmQJHEGawejKUzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Alvaro,

Looking at 0001+0003, I see it claims GIN support for <<@ and @>>, but
> actually only the former is implemented fully; the latter is missing a
> strategy number in ginarrayproc.c and pg_amop.dat, and also
> src/test/regress/sql/gin.sql does not test it. I suspect
> ginqueryarrayextract needs to be told about this too.

GIN/array_ops requires the left operand to be an array, so only @>> can be
used in GIN. However, <<@ is defined as @>> commutative counterpart, so
when for example “5 <<@ index” it will be translated to “index @>> index”
thus indirectly using the GIN index.

We can definitely add tests to “ src/test/regress/sql/gin.sql” to test
this. Do you agree?

Also what do you mean by “ ginqueryarrayextract needs to be told about this
too”?

Best Regards,
Mark Rofail

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-03-27 20:27:51 Idea: Avoid JOINs by using path expressions to follow FKs
Previous Message alvherre@alvh.no-ip.org 2021-03-27 20:04:42 Re: libpq debug log