PostgreSQL Cursor ROWCOUNT
| From: | typea at l-i-e dot com | Date: | Tue, 14 Jan 2003 16:08:05 +0000 |
| Subject: | PostgreSQL Cursor ROWCOUNT | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131578@lists.php.net to get a copy of this message | ||
Given:
PHP 4.x
PostgreSQL 7.3.x
In 'psql' monitor:
declare foo cursor for select * from humongous_table;
move forward all in foo;
The second query will print out a number which informs one of the actual
number of rows that are in the cursor's query's result set, if one were to
actually fetch them all. I would like to get to that number in PHP.
Alas, as far as I can tell, there is to way to get that number through the
PHP API...
For sure:
pg_num_rows -- only counts rows actually "fetched"
pg_last_notice -- nope
pg_result_error -- nope
pg_result_status -- nope
No other documented functions seem appropriate, though I may have missed
one...