Re: PL/pgSQL 1.2

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: PL/pgSQL 1.2
Дата
Msg-id CAASwCXeJL=rVt0Vfc7=4E+YG86k+fZsCgiodDGxNjnXr+qD79A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL 1.2  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: PL/pgSQL 1.2  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Thu, Sep 4, 2014 at 11:07 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> it is different semantic - returns composite or set of composites  --- it is
> not row or rows

The point was, RETURNS returns 1 while RETURNS SETOF returns 0 .. n.

> Actually BL is usually processed oriented, so PL functions coverages changes
> in data, and for queries you use SELECT

OK, so you SELECT directly from tables?
And in the PLs you change a lot of rows in the same txn?

> Returning SET from function is less often - and usually it is not in
> preferred patterns because you can very simple block a optimizer.

Not if you do all access, also SELECT via PLs, then you might want to returns
lists of things based on some input.

But that's a different topic. What I wanted to examplify is the fact
we *already*
have a lot of syntax which handles the 1 row case in a special way.



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL 1.2
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL 1.2