Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5mQn-008QzR-7I for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Oct 2024 13:38:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t5mQk-00GSvy-Rx for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Oct 2024 13:38:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5mQk-00GSvn-IC for pgsql-hackers@lists.postgresql.org; Tue, 29 Oct 2024 13:38:42 +0000 Received: from mail-vs1-xe34.google.com ([2607:f8b0:4864:20::e34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t5mQi-003SJX-H7 for pgsql-hackers@lists.postgresql.org; Tue, 29 Oct 2024 13:38:41 +0000 Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-4a46b6affeaso1886528137.2 for ; Tue, 29 Oct 2024 06:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730209119; x=1730813919; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zgLWqqRl8s/WbxPSFeuILr/KUWHc2Plp8S/rIwp/9R8=; b=dadRFas3GTUJIOBHMY9eEvdnY3/2R8Aj/Rf3Y4zBXTEl0+ZfVQh/voFVbMmsDnRTL8 nGZnyQk9i+OFXGwyHUlJ5/WlidOLmy00HrPKPtk/uIOf5IyXL9+rJlKWkP06hBItXn2D jbrlHyDmM+fR0ZjQEG0VlExHxJQ+o+bujV7VOtkObJlQ7ZP2hrp/IBHurdofnoNWriwd I+UuP6MwF0BpvbWMazxyF3CXsOEooayutp/RWn+X1tuj/LrrdXrcfl11EZsvJPDVEBDR wcIVmxiCNCSQPvaWAOc4oyFAo4lg+tT+wwyxMrtEL9L4yPeEwC9PJeKy7MaSKWVvT4Sf jSsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730209119; x=1730813919; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zgLWqqRl8s/WbxPSFeuILr/KUWHc2Plp8S/rIwp/9R8=; b=VuAjUOEmu1UJ6WKJ2otfHYgQrr6Yz0V8T9TZ/6UEPsg3zHI/XqQhlbBCT6BKl06gv3 Qe56JJAOW/XXofzR8uPiOcWjXQ6Ot8gB1TtSTUZiZWdlbt6ygpGd82CNk0mqxED9Hy3y fNJ0i/lV0H2sg3CREHU+R2f4DfpSufUWZqJ/ZXsQrtjVF0YK5GU5WHKEvttqo6PY4ZRm abTVOj1iPZyJoBiVSuKqFQ73CgtJUjHd4VMyze8XNHGMIs0khe25V05E7s0aeyeDVCp9 SPsW+0CiarPYM2RqbScpROp7O636LPhF2Ru0y0/YYroofYbHNdaXPiQ628tEXLsBQLNu a+WQ== X-Forwarded-Encrypted: i=1; AJvYcCUNH+5xQpysKaS3+ocee9DGCwbElfM22Vg6TuKLPmOUF6mJTN9WNuW7s/1zfimv4gKHi6dOw5gRmZCZJzYD@lists.postgresql.org X-Gm-Message-State: AOJu0YwJCCm3AZwNdvgdf4JEPLlWrKtWmvQWNwZ2qsfrJndp9Qy8ldEb Yj3iXYtqI35U6BAfkEAvH8i9saycBZom2dan5YqGUBarj4VOiYk+bzDKDw/S9ZivbtfNiBIEFRm X1R4JUiugjoqvh6ChNE9l8g740h4= X-Google-Smtp-Source: AGHT+IGbenz/t68y7UUaEzPZyI9aR9lM009K5Qpr42Qo42OO5HkQAZuo8gkZBTspn5NyAfSjAC1w3PnQOpeLPCaPRxU= X-Received: by 2002:a05:6102:1610:b0:4a5:220e:6fac with SMTP id ada2fe7eead31-4a8cfb60ac0mr9781320137.11.1730209119410; Tue, 29 Oct 2024 06:38:39 -0700 (PDT) MIME-Version: 1.0 References: <3002521.1729877700@sss.pgh.pa.us> <3037675.1729884114@sss.pgh.pa.us> <3811251.1730059657@sss.pgh.pa.us> <1fcac348-f3a5-46f8-97fc-f18085d21aa4@gmail.com> <3969781.1730128614@sss.pgh.pa.us> In-Reply-To: <3969781.1730128614@sss.pgh.pa.us> From: Ashutosh Bapat Date: Tue, 29 Oct 2024 19:08:27 +0530 Message-ID: Subject: Re: Alias of VALUES RTE in explain plan To: Tom Lane Cc: Andrei Lepikhov , Yasir , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Oct 28, 2024 at 8:46=E2=80=AFPM Tom Lane wrote: > > Ashutosh Bapat 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 */ WFM. -- Best Wishes, Ashutosh Bapat