Date: 06/18/01
- Next message: sniper <email protected>: "[PHP-DEV] Bug #11527 Updated: session_unregister() seems not work properly"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #9912 Updated: exec calls run programs in the document root: different than PHP3"
- Next in thread: Jon Parise: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Jon Parise: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Georg von Zezschwitz: "Re: [PHP-DEV] Modifications for Postgres driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
As I wanted to migrate a project from ODBC to Postgres, I found
it easier to modify the postgres driver of PHP 4.0.x than to
change my source.
What I disliked (like the PEAR people) is the missing of a
row counter when fetching rows from Postgres result tables.
The mysql/ODBC/Adabas/some-other - way is:
$dbr = xxx_exec ($connection, $query);
while (list ($a, $b, $c) = xxx_fetch_row ($dbr)) {
... // Great, I have my results
}
The traditional and only Postgres way is:
$dbr = xxx_exec ($connection, $query);
$cnt = pg_num_rows ($dbr);
for ($i = 0; $i < $cnt; $i++) {
list ($a, $b, $c) = pg_fetch_row ($dbr, $i)
}
The Postgres way is ugly, but it also makes it difficult
e.g. for the PEAR people to implement the unified interface.
I found it as easy as expected to write a patch that
makes Postgres driver behave like the other drivers, of
cause with full backward compatibility by making the
row number parameter optional.
I also changed the pg_result and the other row-aware functions.
Now, is there a chance to get this into the offical source?
Whom should I contact? I'm willing to update the documentation
in English and German if the patch should be used - but where
to I get it? Could anybody name me a person with CVS access?
Regards,
Georg
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sniper <email protected>: "[PHP-DEV] Bug #11527 Updated: session_unregister() seems not work properly"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #9912 Updated: exec calls run programs in the document root: different than PHP3"
- Next in thread: Jon Parise: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Jon Parise: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Modifications for Postgres driver"
- Reply: Georg von Zezschwitz: "Re: [PHP-DEV] Modifications for Postgres driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

