From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: SRF patch (was Re: [HACKERS] troubleshooting pointers) |
Date: | 2002-05-19 22:36:19 |
Message-ID: | 11519.1021847779@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Joe Conway <mail(at)joeconway(dot)com> writes:
> I was having trouble getting everything to work correctly with
> FunctionNext using cs_ResultTupleSlot. I guess I don't really understand
> the distinction, but I did note that the scan nodes (subqueryscan,
> seqscan, etc) used css_ScanTupleSlot, while the materialization nodes
> tended to use cs_ResultTupleSlot.
ResultTupleSlot is generally used by plan nodes that do ExecProject;
it holds the tuple formed by ExecProject (ie, the calculated SELECT
targetlist). ScanTupleSlot is normally the raw input tuple. For
Functionscan I'd suppose that the scan tuple is the tuple returned
by the function and ResultTupleSlot holds the result of ExecProject.
To see the difference, consider
SELECT a, b, c+1 FROM foo(33);
where foo returns a tuple (a,b,c,d,e). The scanned tuple is
(a,b,c,d,e), the projected tuple is (a,b,c+1).
It may well be that rescan could usefully clear both scan and result
tuples, but I don't see the point of making such a change only in
FunctionScan.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-05-19 22:39:49 | Re: Exposed function to find table in schema search list? |
Previous Message | Tom Lane | 2002-05-19 22:22:29 | Indexscan API cleanup proposal |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2002-05-19 23:33:53 | SRF rescan testing |
Previous Message | Joe Conway | 2002-05-19 21:40:30 | Re: SRF patch (was Re: [HACKERS] troubleshooting pointers) |