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

From Andrei Lepikhov
Subject Re: Alias of VALUES RTE in explain plan
Date
Msg-id 1fcac348-f3a5-46f8-97fc-f18085d21aa4@gmail.com
Whole thread Raw
In response to Re: Alias of VALUES RTE in explain plan  (Yasir <yasir.hussain.shah@gmail.com>)
Responses Re: Alias of VALUES RTE in explain plan
List 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




pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Assertion failure when autovacuum drops orphan temp indexes.
Next
From: Stepan Neretin
Date:
Subject: Re: Assertion failure when autovacuum drops orphan temp indexes.