Procedures returning row sources

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Jan Wieck" <janwieck(at)yahoo(dot)com>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Procedures returning row sources
Date: 2002-03-28 06:03:26
Message-ID: GNELIHDDFBOCMGBFGEFOEEOJCBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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!)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jessica Perry Hekman 2002-03-28 14:34:47 Re: Mailing List Question
Previous Message Tom Lane 2002-03-28 05:05:22 Re: Mailing List Question