Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjS6M-0000yw-71 for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2016 14:20:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bjS6L-0008AW-OI for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2016 14:20:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjS4y-0006aM-Tg for pgsql-hackers@postgresql.org; Mon, 12 Sep 2016 14:19:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjS4t-0004kT-L1 for pgsql-hackers@postgresql.org; Mon, 12 Sep 2016 14:19:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u8CEJEl2024316; Mon, 12 Sep 2016 10:19:15 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling) In-reply-to: <20160827214829.zo2dfb5jaikii5nw@alap3.anarazel.de> References: <20160523005327.v2tr7obytitxcnna@alap3.anarazel.de> <20160822214023.aaxz5l4igypowyri@alap3.anarazel.de> <20160827214829.zo2dfb5jaikii5nw@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 27 Aug 2016 14:48:29 -0700" Date: Mon, 12 Sep 2016 10:19:14 -0400 Message-ID: <24315.1473689954@sss.pgh.pa.us> X-Pg-Spam-Score: -4.1 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > Attached is a significantly updated patch series (see the mail one up > for details about what this is, I don't want to quote it in its > entirety). I've finally cleared my plate enough to start reviewing this patchset. > 0001-Add-some-more-targetlist-srf-tests.patch > Add some test. I think you should go ahead and push this tests-adding patch now, as it adds documentation of the current behavior that is a good thing to have independently of what the rest of the patchset does. Also, I'm worried that some of the GROUP BY tests might have machine-dependent results (if they are implemented by hashing) so it would be good to get in a few buildfarm cycles and let that settle out before we start changing the answers. I do have some trivial nitpicks about 0001: # rules cannot run concurrently with any test that creates a view -test: rules psql_crosstab amutils +test: rules psql_crosstab amutils tsrf Although tsrf.sql doesn't currently need to create any views, it doesn't seem like a great idea to assume that it never will. Maybe add this after misc_functions in the previous parallel group, instead? +-- it's weird to GROUP BYs that increase the number of results "it's weird to have ..." +-- nonsensically that seems to be allowed +UPDATE fewmore SET data = generate_series(4,9); "nonsense that seems to be allowed..." +-- SRFs are now allowed in RETURNING +INSERT INTO fewmore VALUES(1) RETURNING generate_series(1,3); s/now/not/, apparently More to come later, but 0001 is pushable with these fixes. 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