Views and functions returning sets of records

Поиск
Список
Период
Сортировка
От Giorgio Valoti
Тема Views and functions returning sets of records
Дата
Msg-id 6A737ADC-2A11-4A01-8ACE-C439E4297273@mac.com
обсуждение исходный текст
Ответы Re: Views and functions returning sets of records  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: Views and functions returning sets of records  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
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





В списке pgsql-performance по дате отправления:

Предыдущее
От: "sathiya psql"
Дата:
Сообщение: Re: Having MANY MANY empty columns in database
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Views and functions returning sets of records