Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Дата
Msg-id CAMbWs49iDxnvQkEpxJwMSK6eYRFN2YnFVwUXZ_i9aUo9P2D99w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Список pgsql-hackers
On Wed, Jun 19, 2024 at 12:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Richard Guo <guofenglinux@gmail.com> writes:
> > It seems to me that the new operator is somewhat artificial, since it is
> > designed to support a mergejoin but lacks a valid commutator.  So before
> > we proceed to discuss the fix, I'd like to know whether this is a valid
> > issue that needs fixing.

> I do not think we should add a great deal of complexity or extra
> planner cycles to deal with this; but if it can be fixed at low
> cost, we should.

I think we can simply verify the validity of commutators for clauses in
the form "inner op outer" when selecting mergejoin/hash clauses.  If a
clause lacks a commutator, we should consider it unusable for the given
pair of outer and inner rels.  Please see the attached patch.

Thanks
Richard

Вложения

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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Add pg_get_acl() function get the ACL for a database object
Следующее
От: jian he
Дата:
Сообщение: Re: ON ERROR in json_query and the like