Re: Changed SRF in targetlist handling
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-08-22T19:01:01Z
Lists: pgsql-hackers
Hi, On 2016-05-23 09:26:03 +0800, Craig Ringer wrote: > SRFs-in-tlist are a lot faster for lockstep iteration etc. They're also > much simpler to write, though if the result result rowcount differs > unexpectedly between the functions you get exciting and unexpected > behaviour. > > WITH ORDINALITY provides what I think is the last of the functionality > needed to replace SRFs-in-from, but at a syntatactic complexity and > performance cost. The following example demonstrates that, though it > doesn't do anything that needs LATERAL etc. I'm aware the following aren't > semantically identical if the rowcounts differ. I think here you're just missing ROWS FROM (generate_series(..), generate_series(...)) Andres
Commits
-
Remove obsoleted code relating to targetlist SRF evaluation.
- ea15e18677fc 10.0 landed
-
Doc: improve documentation of new SRF-in-tlist behavior.
- f13a1277aa2d 10.0 landed
-
Move targetlist SRF handling from expression evaluation to new executor node.
- 69f4b9c85f16 10.0 landed
-
Don't split up SRFs when choosing to postpone SELECT output expressions.
- d543170f2fdd 9.6.0 cited