From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Don't generate fake "*SELECT*" or "*SELECT* %d" subquery aliases |
Date: | 2025-09-08 15:57:15 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Don't generate fake "*SELECT*" or "*SELECT* %d" subquery aliases.
rte->alias should point only to a user-written alias, but in these
cases that principle was violated. Fixing this causes some regression
test output changes: wherever rte->alias previously had a value and
is now NULL, rte->eref is now set to a generated name rather than to
rte->alias; and the scheme used to generate eref names differs from
what we were doing for aliases.
The upshot is that instead of "*SELECT*" or "*SELECT* %d",
EXPLAIN will now emit "unnamed_subquery" or "unnamed_subquery_%d".
But that's a reasonable descriptor, and we were already producing
that in yet other cases, so this seems not too objectionable.
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Co-authored-by: Robert Haas <rhaas(at)postgresql(dot)org>
Discussion: https://postgr.es/m/CA+TgmoYSYmDA2GvanzPMci084n+mVucv0bJ0HPbs6uhmMN6HMg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/585e31fcb6dfcb1d88cfee2371f565574db24869
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 8 ++++----
src/backend/executor/functions.c | 2 +-
src/backend/parser/analyze.c | 7 ++-----
src/test/regress/expected/partition_prune.out | 4 ++--
src/test/regress/expected/rangefuncs.out | 8 ++++----
src/test/regress/expected/union.out | 14 +++++++-------
6 files changed, 20 insertions(+), 23 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-09-08 16:30:44 | pgsql: Don't generate fake "ANY_subquery" aliases, either. |
Previous Message | Melanie Plageman | 2025-09-08 14:29:53 | pgsql: Remove unneeded VM pin from VM replay |