ID: 22243 Updated by: [EMAIL PROTECTED] Reported By: m-lesser at better-com dot de -Status: Open +Status: Assigned Bug Type: Feature/Change Request Operating System: Any PHP Version: 4.3.0 -Assigned To: +Assigned To: yohgaki New Comment:
Prevent me to forget about this Previous Comments: ------------------------------------------------------------------------ [2003-02-16 08:56:46] m-lesser at better-com dot de IMO it would be helpful if pg_meta_data() could also return the dimension of an array if one uses this feature of postgres: diff -u php4-4.3.0-compiled/ext/pgsql/pgsql.c php4-4.3.0/ext/pgsql/pgsql.c --- php4-4.3.0-compiled/ext/pgsql/pgsql.c 2002-12-21 18:46:32.000000000 +0100 +++ php4-4.3.0/ext/pgsql/pgsql.c 2003-02-16 14:57:10.000000000 +0100 @@ -3078,7 +3078,7 @@ zval *elem; smart_str_appends(&querystr, - "SELECT a.attname, a.attnum, t.typname, a.attlen, a.attnotNULL, a.atthasdef " + "SELECT a.attname, a.attnum, t.typname, a.attlen, a.attnotNULL, a.atthasdef, a.attndims " "FROM pg_class as c, pg_attribute a, pg_type t " "WHERE a.attnum > 0 AND a.attrelid = c.oid AND c.relname = '"); @@ -3117,6 +3117,7 @@ else { add_assoc_bool(elem, "has default", 0); } + add_assoc_long(elem, "array dims", atoi(PQgetvalue(pg_result,i,6))); name = PQgetvalue(pg_result,i,0); add_assoc_zval(meta, name, elem); } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22243&edit=1