Re: [HACKERS] GSoC 2017: Foreign Key Arrays

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Дата
Msg-id 20210327203612.GA29801@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Mark Rofail <markm.rofail@gmail.com>)
Ответы Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Mark Rofail <markm.rofail@gmail.com>)
Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Mark Rofail <markm.rofail@gmail.com>)
Список pgsql-hackers
On 2021-Mar-27, Mark Rofail wrote:

> 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.

Ah, that makes sense.

Looking at the docs again, I don't see anything that's wrong.  I was
confused about the lack of a new strategy number, but that's explained
by what you say above.

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

Yes, we should do that.

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

Well, if it's true that it's translated to the commutator, then I don't
think any other code changes are needed.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: non-HOT update not looking at FSM for large tuple update
Следующее
От: Mark Rofail
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: Foreign Key Arrays