diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-04-05 06:06:21 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-04-05 06:06:21 +0000 |
commit | 04691a516b2ba7f48be76f77ccf6176c85aa9bbc (patch) | |
tree | 20355ee09eeaedc268a893417646e01ed6b0fbd4 /ext/pgsql/tests | |
parent | 22007a29de4382095f479b18f191325e593bcbf6 (diff) | |
download | php-git-04691a516b2ba7f48be76f77ccf6176c85aa9bbc.tar.gz |
Add bytea field to test table.
Use table name variable.
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r-- | ext/pgsql/tests/config.inc | 2 | ||||
-rw-r--r-- | ext/pgsql/tests/createdb.inc | 2 | ||||
-rw-r--r-- | ext/pgsql/tests/large_object.inc | 2 |
3 files changed, 3 insertions, 3 deletions
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"); |