David Fetter wrote:

On Tue, Jul 12, 2005 at 03:45:55PM -0400, Andrew Dunstan wrote:

In perl, if there is any ambiguity it is the called function that is
responsible for checking, not the caller. See "perldoc -f
wantarray".  PLPerl explicitly passed G_SCALAR as a flag on all
calls to plperl routines. So returning a list is a case of pilot
error.

Is this a kind of pilot error that documents could help avert in some
useful way?



Sure. "A plperl function must always return a scalar value.More complex structures (arrays, records, and sets) can be returned in the appropriate context by returning a reference. A list should never be returned." Salt to taste and insert where appropriate.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to