Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Date: 2017-01-17 18:20:52
Message-ID: CA+TgmoZm9sARp1Sv8A3Ar7Mf+cKVhHriGt-oFro6VgKocgOUYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 17, 2017 at 1:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> I'd not have gone for SetResult if we didn't already have Result. I'm
>> not super happy ending up having Project in ProjectSet but not in the
>> Result that end up doing the majority of the projection. But eh, we can
>> live with it.
>
> Using Result for two completely different things is a wart though. If we
> had it to do over I think we'd define Result as a scan node that produces
> rows from no input, and create a separate Project node for the case of
> projecting from input tuples. People are used to seeing Result in EXPLAIN
> output, so it's not worth the trouble of changing that IMO, but we don't
> have to use it as a model for more node types.

+1, although I think changing the existing node would be fine too if
somebody wanted to do the work. It's not worth having that wart
forever just to avoid whatever minor pain-of-adjustment might be
involved.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-01-17 18:24:02 Re: PSQL commands: \quit_if, \quit_unless
Previous Message Tom Lane 2017-01-17 18:18:02 Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)