Re: Retire has_multiple_baserels()
От | Richard Guo |
---|---|
Тема | Re: Retire has_multiple_baserels() |
Дата | |
Msg-id | CAMbWs4_HGVQOXJc87H-x5n8TKtCTObSS++Hi_XRWCYCmWTD-Nw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Retire has_multiple_baserels() (Aleksander Alekseev <aleksander@timescale.com>) |
Список | pgsql-hackers |
On Tue, Oct 10, 2023 at 5:43 PM Aleksander Alekseev <aleksander@timescale.com> wrote:
I used the following patch to double check that nothing was missed:
```
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -2207,8 +2207,13 @@ has_multiple_baserels(PlannerInfo *root)
/* ignore RTEs that are "other rels" */
if (brel->reloptkind == RELOPT_BASEREL)
if (++num_base_rels > 1)
+ {
+
Assert(bms_membership(root->all_baserels) == BMS_MULTIPLE);
return true;
+ }
}
+
+ Assert(bms_membership(root->all_baserels) != BMS_MULTIPLE);
return false;
}
```
It wasn't. The patch LGTM.
Thanks for the verification.
Thanks
Richard
Thanks
Richard
В списке pgsql-hackers по дате отправления: