summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorChristopher Kings-Lynne <chriskl@php.net>2005-03-19 09:20:52 +0000
committerChristopher Kings-Lynne <chriskl@php.net>2005-03-19 09:20:52 +0000
commite4570cdbd2f73629fcdea7919a3c570c792fbe14 (patch)
treebd34468165ad28a0872f70ef6ee5ae3927e69e15 /ext/pgsql/tests
parent28ec3abf871060f253c897b152d268fc864eb7c8 (diff)
downloadphp-git-e4570cdbd2f73629fcdea7919a3c570c792fbe14.tar.gz
Add regression tests for pg_transaction_status and pg_result_error_field
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r--ext/pgsql/tests/02connection.phpt4
-rw-r--r--ext/pgsql/tests/03sync_query.phpt12
2 files changed, 16 insertions, 0 deletions
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);