#25086 [Asn->Csd]: DB:: postgres driver does not support EXPLAIN
| From: | cox@php.net | Date: | Thu, 28 Aug 2003 14:38:36 +0000 |
| Subject: | #25086 [Asn->Csd]: DB:: postgres driver does not support EXPLAIN | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20752@lists.php.net to get a copy of this message | ||
ID: 25086
Updated by: cox@php.net
Reported By: alan at akbkhome dot com
-Status: Assigned
+Status: Closed
Bug Type: PEAR related
Operating System: na
PHP Version: Irrelevant
Assigned To: cox
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-08-13 22:36:00] alan at akbkhome dot com
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 this bug report at http://bugs.php.net/?id=25086&edit=1