Re: Alias of VALUES RTE in explain plan - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Alias of VALUES RTE in explain plan
Date
Msg-id 3969781.1730128614@sss.pgh.pa.us
Whole thread Raw
In response to Re: Alias of VALUES RTE in explain plan  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Alias of VALUES RTE in explain plan
Re: Alias of VALUES RTE in explain plan
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> The patch looks good to me, except the name of the new member.

>   CommonTableExpr *p_parent_cte; /* this query's containing CTE */
> + Alias    *p_parent_alias; /* parent's alias for this query */

> the two "parent"s here mean different things and that might lead one
> to assume that the p_parent_alias refers to alias of CTE. The comment
> adds to the confusion since it mentions parent. How about renaming it
> as p_outer_alias? or something which indicates alias of the outer
> query?

Hmm, I figured the two "parent" references do mean the same thing,
ie the immediately surrounding syntactic construct.  While I won't
fight hard about it, I don't see an advantage in naming the new
field differently.  We could make the comment be

        /* outer level's alias for this query */

if that helps any.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Assertion failure when autovacuum drops orphan temp indexes.
Next
From: Tomas Vondra
Date:
Subject: Re: Avoid possible overflow (src/port/bsearch_arg.c)