Re: Was: Triggers, Stored Procedures, PHP

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Alex Satrapa <alex(at)lintelsys(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Was: Triggers, Stored Procedures, PHP
Date: 2003-11-30 23:42:53
Message-ID: 20031130234253.GB3580@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-12-01 00:23:00 Re: Was: Triggers, Stored Procedures, PHP
Previous Message Andrew Biagioni 2003-11-30 23:39:25 Specify a column without using its name

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-12-01 00:23:00 Re: Was: Triggers, Stored Procedures, PHP
Previous Message Neil Conway 2003-11-30 23:18:54 Re: [HACKERS] initdb should create a warning message [was Re: