Search Postgresql Archives

Re: implicit vs. explicit RETURN when OUT is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux