Re: How to write a function that manipulates a set of results

Поиск
Список
Период
Сортировка
От Ashley Moran
Тема Re: How to write a function that manipulates a set of results
Дата
Msg-id B5B55C8F-8C52-48A5-B8D9-8B071681299D@ashleymoran.me.uk
обсуждение исходный текст
Ответ на Re: How to write a function that manipulates a set of results  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы Re: How to write a function that manipulates a set of results
Re: How to write a function that manipulates a set of results
Список pgsql-general
On Mar 14, 2007, at 6:02 pm, Andreas Kretschmer wrote:
> select * from <insert_your_srf-function_here>.
>
> For instance, if your SRF-function is called foo(), do:
>
> select * from foo();


Andreas,

It's more complicated than that.  What we need to do is something
along the lines of:

results = SELECT * FROM foo();
DELETE FROM results WHERE (some condition involving results);
some_value = SELECT value FROM results WHERE (etc);

and so on...

All of which is easy with table variable, but I can't see how to
translate it to PL/pgsql.  Is there any way to manipulate result sets
in a set-based manner like this?

Ashley




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DST failing on 8.1.3
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: grant permissions to set variable?