Re: [GENERAL] Was: Triggers, Stored Procedures, PHP - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [GENERAL] Was: Triggers, Stored Procedures, PHP
Date
Msg-id 20031130234253.GB3580@dcc.uchile.cl
Whole thread Raw
Responses Re: [GENERAL] Was: Triggers, Stored Procedures, PHP
List pgsql-hackers
On Mon, Dec 01, 2003 at 09:38:06AM +1100, Alex Satrapa wrote:

> create or replace function get_transactions (INTEGER) returns set of
> record as '
> DECLARE
>    cust_id ALIAS FOR $1;
> BEGIN
> for r in select ... from ... loop
>     return next r;
> end loop;
> return;
> END
> ' language 'plpgsql';
>
> But I would certainly love to have parameterised views :)

Me too.  I've created many functions to extract data that are joined to
other functions.  All in all the result is not as optimal as it could
be, because the optimizer can not poke into the functions, and the
estimates about functions are only guesses.  If one could use
parametrized views instead of functions the whole mess would probably be
more optimal.

Maybe there's a TODO here?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)

pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: initdb should create a warning message [was Re:
Next
From: Joe Conway
Date:
Subject: Re: [GENERAL] Was: Triggers, Stored Procedures, PHP