Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause
Дата
Msg-id CAMbWs4-bAEqV_2yggbB0z42zqgWHpcM9d1nWkD1FygpHuFms9g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs

On Thu, Jun 15, 2023 at 7:34 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
I'd always kind of wondered how we got away with not updating
EquivalenceClasses during join removal, and the answer evidently
is that we can't anymore.  I've not tried to write a patch yet.

I wondered about that too, and I thought that the target rel could not
be mentioned in any EC, otherwise join_is_removable should have noticed
that this rel is used above the join and thus decided that the join is
not removable.  Hence there is no need to update ECs during join
removal.  Apparently this is not right, as shown by this issue.

I went ahead and drafted a patch as attached.  But I'm not sure if it
suffices to only update ec_relids, em_relids and ec_sources as the patch
does.  Also I'm wondering if any of them would become empty after the
update.

Thanks
Richard
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: BUG #17949: Adding an index introduces serialisation anomalies.