Thread: plperl, cvs head w/spi patch, return rows on update returns nothing (resend)

The README.spi said that $rv->{rows} should return the number of
rows affected for INSERT, UPDATE & DELETE.  It seems to return NULL.
@{$rv->{rows}} also returns NULL.


-- drop table users ( email text, who text );
create table users ( email text, who text );
insert into users values ('someone@somewhere.com', USER);

create or replace function upd_user( text )
returns integer as
'
my $email = $_[0];
my $qry = "update users set email=''".$email."'' where who = USER ; ";
my $rv = spi_exec_query( $qry );
elog NOTICE, $qry;
elog NOTICE, $rv->{status};
elog NOTICE, $rv->{rows};
return $rv->{rows};
' language 'plperl';

select val_user('me@home');