Re: magical eref alias names
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-11-07T21:32:29Z
Lists: pgsql-hackers
BTW, one aspect of this proposal that needs to be discussed is that
it can break existing SQL. An example discussed nearby[1] is
regression=# select * from (values (1,7), (3,4) order by "*VALUES*".column2);
column1 | column2
---------+---------
3 | 4
1 | 7
(2 rows)
We concluded in the other thread that we didn't want to risk breaking
such code. I concede that this example isn't too compelling on its
own, but I wonder if there's other cases that are more likely to be
in common use.
(If we do decide it's okay to break this, my opinion about what to
do in the other thread would change.)
regards, tom lane
[1] https://www.postgresql.org/message-id/251197.1730222362%40sss.pgh.pa.us
Commits
-
Don't generate fake "*TLOCRN*" or "*TROCRN*" aliases, either.
- 5a170e992a4d 19 (unreleased) landed
-
Don't generate fake "ANY_subquery" aliases, either.
- 6f79024df346 19 (unreleased) landed
-
Don't generate fake "*SELECT*" or "*SELECT* %d" subquery aliases.
- 585e31fcb6df 19 (unreleased) landed
-
Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
- 3a94e789f5c9 7.1.1 cited