From: Wez Furlong Date: Fri, 25 Nov 2005 03:24:32 +0000 (+0000) Subject: PDO support for LOBs in the postgres driver currently assumes bytea columns. X-Git-Tag: php-5.1.1~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2256ec00ef3a90290d333c0cc157a65210e14cde;p=php PDO support for LOBs in the postgres driver currently assumes bytea columns. --- diff --git a/ext/pdo/tests/bug_34630.phpt b/ext/pdo/tests/bug_34630.phpt index d61732724c..a52e738b66 100644 --- a/ext/pdo/tests/bug_34630.phpt +++ b/ext/pdo/tests/bug_34630.phpt @@ -14,10 +14,13 @@ if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE_ require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); -$is_oci = $db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci'; +$driver = $db->getAttribute(PDO::ATTR_DRIVER_NAME); +$is_oci = $driver == 'oci'; if ($is_oci) { $db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val BLOB)'); +} else if ($driver == 'pgsql') { + $db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val bytea)'); } else { $db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val VARCHAR(256))'); }