From: Yasuo Ohgaki Date: Fri, 5 Apr 2002 06:06:21 +0000 (+0000) Subject: Add bytea field to test table. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~871 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04691a516b2ba7f48be76f77ccf6176c85aa9bbc;p=php Add bytea field to test table. Use table name variable. --- diff --git a/ext/pgsql/tests/config.inc b/ext/pgsql/tests/config.inc index a836d556dd..2b5f05a71d 100644 --- a/ext/pgsql/tests/config.inc +++ b/ext/pgsql/tests/config.inc @@ -6,7 +6,7 @@ $conn_str = "host=localhost dbname=test"; // connection string $table_name = "php_pgsql_test"; // test table that should be exist $num_test_record = 1000; // Number of records to create -$table_def = "CREATE TABLE php_pgsql_test (num int, str text);"; // Test table +$table_def = "CREATE TABLE php_pgsql_test (num int, str text, bin bytea);"; // Test table $field_name = "num"; // For pg_field_num() ?> \ No newline at end of file diff --git a/ext/pgsql/tests/createdb.inc b/ext/pgsql/tests/createdb.inc index ed425387fa..28a04b702d 100644 --- a/ext/pgsql/tests/createdb.inc +++ b/ext/pgsql/tests/createdb.inc @@ -8,7 +8,7 @@ if (!@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name))) { @pg_query($db,$table_def); for ($i=0; $i < $num_test_record; $i++) { - pg_query($db,"INSERT INTO php_pgsql_test VALUES ($i, 'ABC');"); + pg_query($db,"INSERT INTO ".$table_name." VALUES ($i, 'ABC');"); } } else { diff --git a/ext/pgsql/tests/large_object.inc b/ext/pgsql/tests/large_object.inc index 2a1159c8c4..5ad84e2c4b 100644 --- a/ext/pgsql/tests/large_object.inc +++ b/ext/pgsql/tests/large_object.inc @@ -2,7 +2,7 @@ include('config.inc'); -$db = pg_connect("host=localhost"); +$db = pg_connect($conn_str); pg_exec ($db, "begin"); $oid = pg_lo_create ($db); if (!$oid) echo ("pg_lo_create() error\n");