ID: 36700
Updated by: [EMAIL PROTECTED]
Reported By: mauroi at digbang dot com
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: Win XP SP2
PHP Version: 5CVS-2006-03-11 (snap)
New Comment:
Just tried current snap, 5.1.3-dev and your example works fine so I
guess the problem has been fixed in the meanwhile. The output I get
is:
array(6) {
["pgsql:oid"]=>
int(25)
["native_type"]=>
string(4) "text"
["name"]=>
string(15) "server_encoding"
["len"]=>
int(-1)
["precision"]=>
int(-1)
["pdo_type"]=>
int(2)
}
Previous Comments:
------------------------------------------------------------------------
[2006-03-12 00:14:35] mauroi at digbang dot com
Sorry for the various comments.
I found that if you fetch one row before executing getColumnMeta,
everything works fine.
------------------------------------------------------------------------
[2006-03-12 00:09:37] mauroi at digbang dot com
Forgot to mention: only php_pdo.dll and php_pdo_pgsql.dll are loaded.
Thanks in advance.
------------------------------------------------------------------------
[2006-03-12 00:07:28] mauroi at digbang dot com
Description:
------------
I have this problem with pdo_pgsql.
Whenever I try to call getColumnMeta on a "strange" query I get a
crash.
Reproduce code:
---------------
<?
$conn = new
PDO('pgsql:host=10.1.1.15;port=5432;dbname=zzz;user=xxx;password=yyy');
$stmt = $conn->prepare('SHOW SERVER_ENCODING');
$stmt->execute();
var_dump($stmt->getColumnMeta(0));
?>
Expected result:
----------------
As the documentation says, I would expect the associative array without
the 'driver:decl_type' position.
Actual result:
--------------
Crash
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36700&edit=1