Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> But when I switch to
> select into _BasketID1,_BasketID2 _BasketID1,_BasketID2 from testA();
> nothing get back from testB().
I think you've forgotten that plpgsql variables will be substituted
for, wherever they appear. The above is just an extremely expensive
form of
_BasketID1 := _BasketID1;
_BasketID2 := _BasketID2;
ie, a big no-op.
The general rule of thumb is not to name plpgsql parameters or variables
the same as fields you'll need to reference in the queries in the
function.
regards, tom lane