Re: are views obsolete ?

From: Gianni Mariani <gianni(at)mariani(dot)ws>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: are views obsolete ?
Date: 2003-05-20 03:37:41
Message-ID: 3EC9A305.6080208@mariani.ws
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> writes:
>
>
>>given the power of SETOF/ROWTYPE functions etc are select-only
>>views becoming obsolete/redundant ?
>>
>>
>
>Not hardly. The planner can optimize queries involving views, since it
>can see what's inside the view definition. SRFs are black boxes and
>thus not optimizable. For example, in
> SELECT * FROM my_srf() WHERE foo
>there's no way to push the "foo" condition down inside my_srf().
>
>
>
Does that include SQL functions ? i.e.

CREATE FUNCTION ParameterizedQuery(integer) RETURNS setof c AS '
select $1 as a, b from c where $1 = c.z + c.x;
' LANGUAGE SQL;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-20 04:06:35 Re: sequence caches
Previous Message Jan Wieck 2003-05-20 01:54:37 Re: infinite trigger loop