From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Trivial revise for the check of parameterized partial paths |
Date: | 2023-06-29 03:23:09 |
Message-ID: | CAMbWs48mKJ6g_GnYNa7dnw04MHaMK-jnAEBrMVhTp2uUg3Ut4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While working on the invalid parameterized join path issue [1], I
noticed that we can simplify the codes for checking parameterized
partial paths in try_partial_hashjoin/mergejoin_path, with the help of
macro PATH_REQ_OUTER.
- if (inner_path->param_info != NULL)
- {
- Relids inner_paramrels =
inner_path->param_info->ppi_req_outer;
-
- if (!bms_is_empty(inner_paramrels))
- return;
- }
+ if (!bms_is_empty(PATH_REQ_OUTER(inner_path)))
+ return;
Also there is a comment there that is not correct.
* If the inner path is parameterized, the parameterization must be fully
* satisfied by the proposed outer path.
This is true for nestloop but not for hashjoin/mergejoin.
Besides, I wonder if it'd be better that we verify that the outer input
path for a partial join path should not have any parameterization
dependency.
Attached is a patch for all these changes.
Thanks
Richard
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Trivial-revise-for-the-check-of-parameterized-partial-paths.patch | application/octet-stream | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2023-06-29 03:25:53 | Re: Another incorrect comment for pg_stat_statements |
Previous Message | jian he | 2023-06-29 02:58:23 | Re: [PGdocs] fix description for handling pf non-ASCII characters |