It seems that in the new PL/Perl, the result of the spi_exec_query 
function changes in meaning depending on the command.  For a SELECT, 
the value of

$res->{rows}

is a reference to an array of the result rows.

For a different command

$res->{rows}

is a scalar containing the number of affected rows.  I think this is a 
poor design.  Couldn't we have a different result field that always 
contains the number of rows?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to