diff options
author | Christopher Kings-Lynne <chriskl@php.net> | 2005-03-22 08:51:23 +0000 |
---|---|---|
committer | Christopher Kings-Lynne <chriskl@php.net> | 2005-03-22 08:51:23 +0000 |
commit | e2b87e6230f617813adf9387f81f8eb8c53f013a (patch) | |
tree | a914984e9a801c8a607bee7c6350e228c8c742f1 /ext/pgsql/tests | |
parent | b30d8beebf70a92cc69a3a627d04f1aff62c1f78 (diff) | |
download | php-git-e2b87e6230f617813adf9387f81f8eb8c53f013a.tar.gz |
Tweak some #if's to be more orthogonal.
(PHP pg_set_error_verbosity) New function to set PostgreSQL error verbosity
(PHP pg_copy_from) Use non-deprecated API if it is available
(PHP pg_copy_to) Use non-deprecated API if it is available
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r-- | ext/pgsql/tests/06copy.phpt | 7 | ||||
-rw-r--r-- | ext/pgsql/tests/07optional.phpt | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ext/pgsql/tests/06copy.phpt b/ext/pgsql/tests/06copy.phpt index e5823c43a5..bed783a6f8 100644 --- a/ext/pgsql/tests/06copy.phpt +++ b/ext/pgsql/tests/06copy.phpt @@ -7,6 +7,13 @@ PostgreSQL copy functions include('config.inc'); +$db = pg_connect($conn_str); + +$rows = pg_copy_to($db, $table_name); + +pg_query($db, "DELETE FROM $table_name"); + +pg_copy_from($db, $table_name, $rows); echo "OK"; diff --git a/ext/pgsql/tests/07optional.phpt b/ext/pgsql/tests/07optional.phpt index e73a9cffe0..9fa6f16331 100644 --- a/ext/pgsql/tests/07optional.phpt +++ b/ext/pgsql/tests/07optional.phpt @@ -13,6 +13,11 @@ $enc = pg_client_encoding($db); pg_set_client_encoding($db, $enc); +if (function_exists('pg_set_error_verbosity')) { + pg_set_error_verbosity(PGSQL_ERRORS_TERSE); + pg_set_error_verbosity(PGSQL_ERRORS_DEFAULT); + pg_set_error_verbosity(PGSQL_ERRORS_VERBOSE); +} echo "OK"; ?> --EXPECT-- |