Views and functions returning sets of records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
maybe it’s a naive question but I was wondering if there is any difference, from a performance point of view, between a view and a function performing the same task, something like:

CREATE VIEW foo AS …;
CREATE FUNCTION getfoo(int) RETURNS SETOF foo AS $$
	SELECT * FROM foo WHERE fooid = $1;
$$ LANGUAGE SQL;


Thank you
--
Giorgio Valoti





--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux