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



Reply via email to