Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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. 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'?



(Sick of returning arrays and comma delimited lists from functions!)

In response to

pgsql-hackers by date

Next:From: Jessica Perry HekmanDate: 2002-03-28 14:34:47
Subject: Re: Mailing List Question
Previous:From: Tom LaneDate: 2002-03-28 05:05:22
Subject: Re: Mailing List Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group