Re: cvs: php4 /ext/pgsql pgsql.c
| From: | Yasuo Ohgaki | Date: | Thu, 25 Apr 2002 05:45:22 +0000 |
| Subject: | Re: cvs: php4 /ext/pgsql pgsql.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-11413@lists.php.net to get a copy of this message | ||
Markus Fischer wrote:
No. It will be stay there for existing scripts. This is the reason for this change. pg_fetch_object() used to return object that has properties named by field number & field name. However, numeric name is not allowed in PHP. User has no way to access numerically named properties. It was just wasting memory. I've changed code so that default for 3rd parameter became PGSQL_ASSOC. If user ommit 3rd parameter, OLD: pg_fetch_object($db, 10, PGSQL_BOTH); NEW: pg_fetch_object($db, 10, PGSQL_ASSOC); User can specify 3rd parameter even if PGSQL_BOTH or PGSQL_NUM for it does not make sense. Any scripts will not be affected by this change. (Unless we change PHP_FUNCTION(pg_fetch_object), I'll add comment to prevent other person accidentally modify the way it is now) -- Yasuo OhgakiHi,does this mean that the result_type parameter, which was introduced in version 4.0.0, is deprecated as of now and will be removed in a future version > 4.3.0 ?
- MarkusOn Wed, Apr 24, 2002 at 11:03:58PM -0000, Yasuo Ohgaki wrote :yohgaki Wed Apr 24 19:03:58 2002 EDTModified files: /php4/ext/pgsql pgsql.c Log:Remove result_type from pg_fetch_object() proto. It still accepts 3rd argument, but passing 3rd argument does not make sense for pg_fetch_object(). Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.195 php4/ext/pgsql/pgsql.c:1.196 --- php4/ext/pgsql/pgsql.c:1.195 Wed Apr 24 18:57:21 2002 +++ php4/ext/pgsql/pgsql.c Wed Apr 24 19:03:48 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.195 2002/04/24 22:57:21 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.196 2002/04/24 23:03:48 yohgaki Exp $ */ #include <stdlib.h> @@ -1343,7 +1343,7 @@ } /* }}} */ -/* {{{ proto object pg_fetch_object(resource result [, int row [, int result_type]]) +/* {{{ proto object pg_fetch_object(resource result [, int row]) Fetch a row as an object */ PHP_FUNCTION(pg_fetch_object) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php