Jan wrote:
> There is a way to return anything. The problem in PostgreSQL
> is to actually USE it.
>
> Our idea originally was to extend the capabilities of a
> rangetable entry. Currently, rangetable entries can only
> hold a relation, which is a table or a view. After rewriting,
> they are down to real tables only.
>
> But basically, a rangetable entry should just be a row-
> source, so that a function returning a row-set could occur
> there too.
>
> In order to avoid multiple calls to the function because of
> nestloops and the like, I think when a set function occurs in
> a RTE, it's result should be dumped into a sort-tape and that
> is used as the row source in the rest of the plan.
Hmmm...now that my SET NOT NULL patch is on the list, I'm thinking about
what to tackle next. This is something that would be incredibly useful to
me, but sounds pretty difficult (for someone unfamiliar with the code).
So, some questions:
1. Can someone give me some pointers as to whereabouts I should look in the
source code, and what I should be looking for, given that I've never played
in the rewriter/executor before?
2. Maybe a general plan-of-attack? ie. What things would need to be changed
and what order should I change them in...
3. Tell me it's worth me spending time on this - that it's not something a
main developer could just code up in an evening?
4. What stuff has Tom done that should make it 'easy'?
Cheers,
Chris
(Sick of returning arrays and comma delimited lists from functions!)