Re: Optimizer failed to generate plan

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Optimizer failed to generate plan
Дата
Msg-id CAApHDvq=MvEosOWazo45YFTkmuOD0qv1_Tz4dvcgem2aDraaDA@mail.gmail.com
обсуждение исходный текст
Ответ на Optimizer failed to generate plan  (xianliang.ji@esgyn.cn)
Список pgsql-bugs
On Tue, 14 Feb 2023 at 00:18, <xianliang.ji@esgyn.cn> wrote:
> postgres=# select a.*,b.* from EMP a FULL JOIN DEPT b on
> a.deptno=b.deptno OR upper(ename)='BLAKE' where a.job='MANAGER' OR
> b.dname='SALES';
> ERROR:  FULL JOIN is only supported with merge-joinable or hash-joinable

It's not a bug. The problem is the join condition has OR conditions
and we can do a full Hash or Merge join for joins like that.

I'm a bit unclear on what you need exactly, but maybe you could get it
by repeating the query once for each branch of the OR and then
performing a UNION ALL.

David



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: array_agg(DISTINCT) caused a segmentation fault
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: array_agg(DISTINCT) caused a segmentation fault