Re: Alias of VALUES RTE in explain plan

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Alias of VALUES RTE in explain plan
Date: 2024-10-28 04:47:30
Message-ID: 1fcac348-f3a5-46f8-97fc-f18085d21aa4@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/28/24 03:15, Yasir wrote:
> By design of my solution, I was not taking it as a bug. But now, I agree
> with your opinion.
I think the case provided by Ashutosh was initially correct, and nothing
needs to change. Look at the similar case:

EXPLAIN SELECT x,y FROM (
SELECT oid,relname FROM pg_class WHERE relname = 'pg_index') AS
c(x,y) WHERE c.y = 'pg_index';

QUERY PLAN

--------------------------------------------------------------------------------------------
Index Scan using pg_class_relname_nsp_index on pg_class
(cost=0.27..8.29 rows=1 width=68)
Index Cond: (relname = 'pg_index'::name)
(2 rows)

I don't see any reference to the alias c(x,y) in this explain.
Similarly, the flattened VALUES clause shouldn't be referenced under the
alias t(a,b).

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stepan Neretin 2024-10-28 04:47:59 Re: Assertion failure when autovacuum drops orphan temp indexes.
Previous Message Masahiko Sawada 2024-10-28 04:36:38 Re: Assertion failure when autovacuum drops orphan temp indexes.