pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Date: Wed, 18 Jan 2017 14:24:12 -0500
Message-ID: <13690.1484767452@sss.pgh.pa.us> (raw)
In-Reply-To: <20170118191924.25lfp6rd6y3kw5sa@alap3.anarazel.de>
References: <21924.1484593998@sss.pgh.pa.us>
	<CA+TgmoboiMYk1jTL-=2a0iukktCoDnKHMhrQ9za8JrMvkFdYUw@mail.gmail.com>
	<29207.1484675540@sss.pgh.pa.us>
	<20170117180324.dqgz23xaf6wtazb4@alap3.anarazel.de>
	<30268.1484677082@sss.pgh.pa.us>
	<CA+TgmoZm9sARp1Sv8A3Ar7Mf+cKVhHriGt-oFro6VgKocgOUYg@mail.gmail.com>
	<32021.1484678618@sss.pgh.pa.us>
	<20170117185346.z55d3jnsaf24yr4m@alap3.anarazel.de>
	<837.1484680521@sss.pgh.pa.us>
	<12780.1484747004@sss.pgh.pa.us>
	<20170118191924.25lfp6rd6y3kw5sa@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> On 2017-01-18 08:43:24 -0500, Tom Lane wrote:
>> ... except for one thing.  The more I look at it,
>> the more disturbed I am by the behavioral change shown in rangefuncs.out
>> --- that's the SRF-in-one-arm-of-CASE issue.

> I'm fine with leaving it as is in the patch, but I'm also fine with
> changing things to ERROR.  Personally I don't think it matters much, and
> we can whack it back and forth as we want later.  Thus I'm inclined to
> commit it without erroring out; since presumably we'll take some time
> deciding on what exactly we want to prohibit.

I agree.  If we do decide to throw an error, it would best be done in
parse analysis, and thus would be practically independent of this patch
anyway.

>> * This bit in ExecProjectSRF was no good:
>> +         else if (IsA(gstate->arg, FuncExprState) &&
>> +                  ((FuncExpr *) gstate->arg->expr)->funcretset)

> Argh. That should have been FunExprState->func->fn_retset.

Nope; that was my first thought as well, but fn_retset isn't valid if
init_fcache hasn't been run yet, which it won't have been the first time
through.

So I think we can push this patch now and get on with the downstream
patches.  Do you want to do the honors, or shall I?

			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



view thread (110+ messages)  latest in thread

Message-ID: <13690.1484767452@sss.pgh.pa.us>
Permalink:  ../13690.1484767452@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13690.1484767452@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com
  Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
  In-Reply-To: <13690.1484767452@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