cvs: php-src /ext/pgsql/tests 02connection.phpt 03sync_query.phpt
| From: | Christopher Kings-Lynne | Date: | Sat, 19 Mar 2005 09:20:53 +0000 |
| Subject: | cvs: php-src /ext/pgsql/tests 02connection.phpt 03sync_query.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31007@lists.php.net to get a copy of this message | ||
chriskl Sat Mar 19 04:20:53 2005 EDT
Modified files:
/php-src/ext/pgsql/tests 02connection.phpt 03sync_query.phpt
Log:
Add regression tests for pg_transaction_status and pg_result_error_field
http://cvs.php.net/diff.php/php-src/ext/pgsql/tests/02connection.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/pgsql/tests/02connection.phpt
diff -u php-src/ext/pgsql/tests/02connection.phpt:1.3 php-src/ext/pgsql/tests/02connection.phpt:1.4
--- php-src/ext/pgsql/tests/02connection.phpt:1.3 Tue Mar 9 09:37:49 2004
+++ php-src/ext/pgsql/tests/02connection.phpt Sat Mar 19 04:20:52 2005
@@ -23,6 +23,10 @@
{
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";
http://cvs.php.net/diff.php/php-src/ext/pgsql/tests/03sync_query.phpt?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/pgsql/tests/03sync_query.phpt
diff -u php-src/ext/pgsql/tests/03sync_query.phpt:1.3 php-src/ext/pgsql/tests/03sync_query.phpt:1.4
--- php-src/ext/pgsql/tests/03sync_query.phpt:1.3 Sat Sep 6 14:34:55 2003
+++ php-src/ext/pgsql/tests/03sync_query.phpt Sat Mar 19 04:20:52 2005
@@ -32,6 +32,18 @@
}
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);