Re: trying to write a many-to-many type function. - Mailing list pgsql-general

From Tom Lane
Subject Re: trying to write a many-to-many type function.
Date
Msg-id 16015.1146174880@sss.pgh.pa.us
Whole thread Raw
In response to trying to write a many-to-many type function.  (Eric Davies <Eric@barrodale.com>)
List pgsql-general
Eric Davies <Eric@barrodale.com> writes:
> As far as I can see, you can't write a set returning function that
> takes a set as input, as in
>        select getMetaData( select * from mytable);

> Is a function of the type I'm trying to write even possible in PostgreSQL?

I don't think it's possible at the moment :-(.  We've speculated about
ways to relax the restriction that a function in FROM can't take any
non-constant arguments.  It appears that adding SQL99's LATERAL and/or
UNNEST features might do it ... I've had a hard time finding any very
clear explanation of their semantics, though, so I'm not entirely sure.

            regards, tom lane

pgsql-general by date:

Previous
From: Joachim Zobel
Date:
Subject: [Announce] mod_sqil: an RDMS => XML mapper apache module
Next
From: Mike Leahy
Date:
Subject: Help with unpredictable use of indexes on large tables...