diff options
| author | Christopher Kings-Lynne <chriskl@php.net> | 2005-03-19 09:20:52 +0000 |
|---|---|---|
| committer | Christopher Kings-Lynne <chriskl@php.net> | 2005-03-19 09:20:52 +0000 |
| commit | e4570cdbd2f73629fcdea7919a3c570c792fbe14 (patch) | |
| tree | bd34468165ad28a0872f70ef6ee5ae3927e69e15 /ext/pgsql/tests | |
| parent | 28ec3abf871060f253c897b152d268fc864eb7c8 (diff) | |
| download | php-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.phpt | 4 | ||||
| -rw-r--r-- | ext/pgsql/tests/03sync_query.phpt | 12 |
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); |
