On Thu, Sep 4, 2014 at 11:07 AM, Pavel Stehule <pavel.steh...@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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers