On 04/03/2012 10:21 AM, Robert Haas wrote:
>
> You should probably test this in your environment, but I'd expect the
> view to be better. Wrapping logic inside PL/pgsql functions
> needlessly rarely turn outs to be a win.
Right, But also note that auto_explain is very useful in getting plans
and times of queries nested in functions which can't easily be got
otherwise.
cheers
andrew