public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Dean Rasheed <[email protected]>
Cc: Erwin Brandstetter <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Making the subquery alias optional in the FROM clause
Date: Mon, 02 Oct 2023 09:39:14 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEZATCVOJ-dMNNNrGpsXnTW+7ZAd7YM7+FMTPVw_1yexk8=zkA@mail.gmail.com>
References: <CAEZATCUCGCf82=hxd9N5n6xGHPyYpQnxW8HneeH+uP7yNALkWA@mail.gmail.com>
<CAGHENJ6MUCdJxoh3mebMnJk4w1N_-VJM_kXPA3dcS=YD+t3ytg@mail.gmail.com>
<[email protected]>
<CAEZATCVOJ-dMNNNrGpsXnTW+7ZAd7YM7+FMTPVw_1yexk8=zkA@mail.gmail.com>
Dean Rasheed <[email protected]> writes:
> On Mon, 2 Oct 2023 at 01:01, Tom Lane <[email protected]> wrote:
>> Yeah, that's exposing more of the implementation than we really want.
> Note that this isn't a new issue, specific to unnamed subqueries. The
> same thing happens for unnamed joins:
True, and we've had few complaints about that. Still, if we can
clean it up without too much effort, let's do so.
> So I think perhaps it's better to just have searchRangeTableForRel()
> exclude these kinds of RTE, if they haven't been given an alias.
Would we need a new flag in the ParseNamespaceItem data structure,
or will the existing data serve? I see how to do this if we add
a "doesn't really have a name" flag, but it's not clear to me that
we can reliably identify them otherwise. Maybe a test involving
the rtekind and whether the "alias" field is set would do, but
that way seems a bit ugly.
regards, tom lane
view thread (5+ messages)
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: Making the subquery alias optional in the FROM clause
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