|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-12 00:07 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
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) }