From: Christopher Kings-Lynne Date: Sat, 19 Mar 2005 09:20:52 +0000 (+0000) Subject: Add regression tests for pg_transaction_status and pg_result_error_field X-Git-Tag: php-5.0.1b1~756 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4570cdbd2f73629fcdea7919a3c570c792fbe14;p=php Add regression tests for pg_transaction_status and pg_result_error_field --- diff --git a/ext/pgsql/tests/02connection.phpt b/ext/pgsql/tests/02connection.phpt index 4f21fcdf91..761ddc22a3 100644 --- a/ext/pgsql/tests/02connection.phpt +++ b/ext/pgsql/tests/02connection.phpt @@ -23,6 +23,10 @@ if (pg_connection_busy($db)) { echo "pg_connection_busy() error\n"; } +if (pg_transaction_status($db) != PGSQL_TRANSACTION_IDLE) +{ + echo "pg_transaction_status() error\n"; +} if (!pg_host($db)) { echo "pg_host() error\n"; diff --git a/ext/pgsql/tests/03sync_query.phpt b/ext/pgsql/tests/03sync_query.phpt index 96827fe5a2..a2ea7de4e9 100644 --- a/ext/pgsql/tests/03sync_query.phpt +++ b/ext/pgsql/tests/03sync_query.phpt @@ -32,6 +32,18 @@ for ($i=0; $i < $rows; $i++) } pg_result_error($result); +pg_result_error_field($result, PGSQL_DIAG_SEVERITY); +pg_result_error_field($result, PGSQL_DIAG_SQLSTATE); +pg_result_error_field($result, PGSQL_DIAG_MESSAGE_PRIMARY); +pg_result_error_field($result, PGSQL_DIAG_MESSAGE_DETAIL); +pg_result_error_field($result, PGSQL_DIAG_MESSAGE_HINT); +pg_result_error_field($result, PGSQL_DIAG_STATEMENT_POSITION); +pg_result_error_field($result, PGSQL_DIAG_INTERNAL_POSITION); +pg_result_error_field($result, PGSQL_DIAG_INTERNAL_QUERY); +pg_result_error_field($result, PGSQL_DIAG_CONTEXT); +pg_result_error_field($result, PGSQL_DIAG_SOURCE_FILE); +pg_result_error_field($result, PGSQL_DIAG_SOURCE_LINE); +pg_result_error_field($result, PGSQL_DIAG_SOURCE_FUNCTION); pg_num_rows(pg_query($db, "SELECT * FROM ".$table_name.";")); pg_num_fields(pg_query($db, "SELECT * FROM ".$table_name.";")); pg_field_name($result, 0);