Re: [PHP4BETA] cvs: /php4/pear DB.php /php4/pear/DB common.php mysql.php pgsql.php storage.php
| From: | Rui Hirokawa | Date: | Fri, 18 Feb 2000 01:06:24 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4/pear DB.php /php4/pear/DB common.php mysql.php pgsql.php storage.php | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10425@lists.php.net to get a copy of this message | ||
ssb> --- php4/pear/DB/pgsql.php:1.1 Mon Feb 14 07:42:23 2000
ssb> +++ php4/pear/DB/pgsql.php Thu Feb 17 12:21:02 2000
ssb> @@ -20,15 +20,25 @@
ssb> // Database independent query interface definition for PHP's PostgreSQL
ssb> // extension.
ssb> //
ssb> +// [SSB] Problems in this code:
ssb> +//
ssb> +// 1. $this->row is used as a row counter
ssb> +// for the fetchRow() implementation. There are two problems with this:
ssb> +// First of all, $this->row is not reset when the result is freed. Also,
ssb> +// If the user creates two DB_result objects on the same DB connection,
ssb> +// it will break completely because both result sets will be using the
ssb> +// same row counter. Solution: change $this->row into an array indexed
ssb> +// by resource id.
I understand the current implementation of DB_pgsql has some problems.
I will try to fix these problems.
ssb> +//
ssb> +// 2. The pgsql extension currently does not have error codes. This
ssb> +// should be fixed so DB_pgsql can do portable error codes.
ssb> +//
ssb>
The current implementation of DB_pgsql can't handle error codes because
the current pgsql extention does not support any error codes.
But the API change in error codes of the pgsql extention may causes some
imcompatibility problem with the old codes which depend on the current
error codes.
I think the new function handling the error codes
should be added to maintain the compatibility.
---------------------------------------------------------------
Rui Hirokawa <Rui.Hirokawa@kama.melco.co.jp>
<louis@cityfujisawa.ne.jp>
http://www.cityfujisawa.ne.jp/~louis/
---------------------------------------------------------------