Index: doc/src/sgml/plperl.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plperl.sgml,v
retrieving revision 2.30
diff -c -r2.30 plperl.sgml
*** doc/src/sgml/plperl.sgml 6 Nov 2004 14:32:10 -0000 2.30
--- doc/src/sgml/plperl.sgml 19 Nov 2004 18:52:34 -0000
***************
*** 174,189 ****
$rv = spi_exec_query('SELECT * FROM my_table', 5);
! This returns up to 5 rows from the table
! my_table. If my_table
! has a column my_column, it could be accessed
! like this:
$foo = $rv->{rows}[$i]->{my_column};
! The total number of rows returned can be accessed like this:
! $nrows = @{$rv->{rows}};
--- 174,190 ----
$rv = spi_exec_query('SELECT * FROM my_table', 5);
! This returns up to 5 rows from the table
! my_table. If my_table
! has a column my_column, you can get the value that
! value from row $i from a
! SELECT like this:
$foo = $rv->{rows}[$i]->{my_column};
! The total number of rows returned from a SELECT query can be accessed like this:
! $nrows = $rv->{processed}
***************
*** 200,206 ****
To get the number of rows affected, do:
! $nrows = $rv->{rows};
--- 201,207 ----
To get the number of rows affected, do:
! $nrows = $rv->{processed};