From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Date: Mon, 12 Sep 2016 13:48:05 -0400
Message-ID: <9209.1473702485@sss.pgh.pa.us> (raw)
In-Reply-To: <20160912174443.w5w55mkmcyfp67w2@alap3.anarazel.de>
References: <20160523005327.v2tr7obytitxcnna@alap3.anarazel.de>
<20160822214023.aaxz5l4igypowyri@alap3.anarazel.de>
<20160827214829.zo2dfb5jaikii5nw@alap3.anarazel.de>
<5460.1473696601@sss.pgh.pa.us>
<20160912165403.vshr7tazhr6wrpp4@alap3.anarazel.de>
<8136.1473701180@sss.pgh.pa.us>
<20160912174443.w5w55mkmcyfp67w2@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andres Freund <andres@anarazel.de> writes:
> On 2016-09-12 13:26:20 -0400, Tom Lane wrote:
>> Andres Freund <andres@anarazel.de> writes:
> On 2016-09-12 12:10:01 -0400, Tom Lane wrote:
>>>> I can't say that I like the proposed syntax much.
>>> Me neither. But I haven't really found a better approach. It seems
>>> kinda consistent to have ROWS FROM (... AS ()) change the picked out
>>> columns to 0, and just return the whole thing.
>> I just remembered that we allow zero-column composite types, which
>> makes this proposal formally ambiguous. So we really need a different
>> syntax. I'm not especially in love with the cast-to-record idea, but
>> it does dodge that problem.
> I kind of like ROWS FROM (... AS VALUE), that seems to confer the
> meaning quite well. As VALUE isn't a reserved keyword, that'd afaik only
> really work inside ROWS FROM() where AS is required.
Hm, wouldn't ... AS RECORD convey the meaning better?
(Although once you look at it that way, it's just a cast spelled in
an idiosyncratic fashion.)
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
In-Reply-To: <9209.1473702485@sss.pgh.pa.us>
* 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