#25086 [NEW]: DB:: postgres driver does not support EXPLAIN

From: Date: Thu, 14 Aug 2003 03:36:00 +0000
Subject: #25086 [NEW]: DB:: postgres driver does not support EXPLAIN
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19705@lists.php.net to get a copy of this message
From: alan at akbkhome dot com Operating system: na PHP version: Irrelevant PHP Bug Type: PEAR related Bug description: DB:: postgres driver does not support EXPLAIN Description: ------------ not that the information is that helpfull :) --- Projects/pear/pearcvs/DB/DB/pgsql.php 2003-07-19 17:38:35.000000000 +0800 +++ /usr/share/pear/DB/pgsql.php 2003-08-14 11:24:34.000000000 +0800 @@ -170,8 +170,9 @@ if ($ismanip) { $this->affected = @pg_cmdtuples($result); return DB_OK; - } elseif (preg_match('/^\s*\(?\s*SELECT\s+/si', $query) && - !preg_match('/^\s*\(?\s*SELECT\s+INTO\s/si', $query)) { + } elseif ((preg_match('/^\s*\(?\s*SELECT\s+/si', $query) && + !preg_match('/^\s*\(?\s*SELECT\s+INTO\s/si', $query)) || + preg_match('/^\s*EXPLAIN/si',$query )) { /* PostgreSQL commands: ABORT, ALTER, BEGIN, CLOSE, CLUSTER, COMMIT, COPY, CREATE, DECLARE, DELETE, DROP TABLE, EXPLAIN, FETCH, Reproduce code: --------------- $db->getAll('EXPLAIN SELECT * FROM anytable'); will barf with selecton on non-object. ** DB_Common::getAll() should also check the return value for query is not an integer... -- Edit bug report at http://bugs.php.net/?id=25086&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25086&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25086&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25086&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25086&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25086&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25086&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25086&r=support Expected behavior: http://bugs.php.net/fix.php?id=25086&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25086&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25086&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25086&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25086&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25086&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25086&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25086&r=gnused

« previous php.pear.dev (#19705) next »