public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: ExecTypeSetColNames is fundamentally broken
Date: Mon, 06 Dec 2021 16:05:32 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoaYDAqLLmxo_d9h2SZ1Mw28M9w5QZMuZcaL6D2JdG_B6w@mail.gmail.com>
References: <[email protected]>
<CA+TgmoaYDAqLLmxo_d9h2SZ1Mw28M9w5QZMuZcaL6D2JdG_B6w@mail.gmail.com>
Robert Haas <[email protected]> writes:
> I don't understand the code so I can't comment on the code, but I find
> the regression test changes pretty suspect. Attaching any alias list
> to the RTE ought to rename the output columns for all purposes, not
> just the ones we as implementers find convenient.
Well, that was what I thought when I wrote bf7ca1587, but it leads
to logical contradictions. Consider
create table t (a int, b int);
create function f(t) returns ... ;
select f(t) from t;
select f(t) from t(x,y);
If we adopt the "rename for all purposes" interpretation, then
the second SELECT must fail, because what f() is being passed is
no longer of type t. If you ask me, that'll be a bigger problem
for users than the change I'm proposing (quite independently of
how hard it might be to implement). It certainly will break
a behavior that goes back much further than bf7ca1587.
regards, tom lane
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: ExecTypeSetColNames is fundamentally broken
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox