Re: Changed SRF in targetlist handling
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2016-08-22T18:44:17Z
Lists: pgsql-hackers
On 2016-08-17 17:41:28 -0700, Andres Freund wrote: > Tom, do you think this is roughly going in the right direction? My plan > here is to develop two patches, to come before this: > > a) Allow to avoid using a tuplestore for SRF_PERCALL SRFs in ROWS FROM - > otherwise our performance would regress noticeably in some cases. > b) Allow ROWS FROM() to return SETOF RECORD type SRFs as one column, > instead of expanded. That's important to be able move SETOF RECORD > returning functions in the targetlist into ROWS FROM, which otherwise > requires an explicit column list. I'm working on these. Atm ExecMakeTableFunctionResult() resides in execQual.c - I'm inlining it into nodeFunctionscan.c now, because there's no other callers, and having it separate seems to bring no benefit. Please speak soon up if you disagree. 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