From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Wen Yi <wen-yi@qq.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: [Beginner Question]What's the use of ResTarget?
Date: Sun, 9 Jul 2023 12:59:31 +0200
Message-ID: <20230709105931.433b65q2r5debqfh@alvherre.pgsql> (raw)
In-Reply-To: <tencent_0349E3BB34D43DADCE985640CAC52DB9C10A@qq.com>
On 2023-Jul-02, Wen Yi wrote:
> Hi community
> When I read the Internals document (41.1. The Query Tree),
> the introduction of the 'the result relation' confuse me.
There are "result relations" in commands that modify a relation, such as
insert or update. The result relation is where the new tuples are
inserted, or where the modified tuples are.
> in my original understand, I guess the use of ResTarget is to store
> the columns of the result, like:
>
> SELECT row_1, row_2 FROM table;
Yeah. Those aren't necessarily in the result relation, because (as the
doc says) a SELECT does not even *have* a result relation.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Once again, thank you and all of the developers for your hard work on
PostgreSQL. This is by far the most pleasant management experience of
any database I've worked on." (Dan Harris)
http://archives.postgresql.org/pgsql-performance/2006-04/msg00247.php
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@alvh.no-ip.org, wen-yi@qq.com
Subject: Re: [Beginner Question]What's the use of ResTarget?
In-Reply-To: <20230709105931.433b65q2r5debqfh@alvherre.pgsql>
References: <tencent_0349E3BB34D43DADCE985640CAC52DB9C10A@qq.com> <20230709105931.433b65q2r5debqfh@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox