On Wed, Oct 5, 2022 at 4:38 AM Andrey Lepikhov <[email protected]>
wrote:
> On 5/10/2022 02:45, Zhihong Yu wrote:
> > Hi,
> > For contain_placeholders():
> >
> > + if (IsA(node, Query))
> > + return query_tree_walker((Query *) node, contain_placeholders,
> > context, 0);
> > + else if (IsA(node, PlaceHolderVar))
> Fixed
> >
> > The `else` is not needed.
> >
> > For correlated_t struct, it would be better if the fields have comments.
> Ok, I've added some comments.
> >
> > + * (for grouping, as an example). So, revert its
> > status to
> > + * a full valued entry.
> >
> > full valued -> fully valued
> Fixed
>
> --
> regards,
> Andrey Lepikhov
> Postgres Professional
>
Hi,
+ List *pulling_quals; /* List of expressions contained pulled
expressions */
contained -> containing
+ /* Does the var already exists in the target list? */
exists -> exist
+ {"optimize_correlated_subqueries", PGC_USERSET, QUERY_TUNING_METHOD,
Is it possible that in the future there would be other optimization for
correlated subqueries ?
If so, either rename the guc or, make the guc a string which represents an
enum.
Cheers