From 1168c306359b2b763274bf2d1fbf21ade775ebcb Mon Sep 17 00:00:00 2001 From: Christopher Kings-Lynne Date: Sat, 19 Mar 2005 08:46:56 +0000 Subject: Added several new functions to support the PostgreSQL v3 protocol introduced in PostgreSQL 7.4. (PHP pg_transaction_status) New function to get in-transaction status of a database connection. (PHP pg_query_params) New function to allow execution of parameterized queries. (PHP pg_prepare) New function to allow preparing named queries. (PHP pg_execute) New function to allow execution of named prepared queries. (PHP pg_send_query_params) New function that is the async equivalent of pg_query_params. (PHP pg_send_prepare) New function that is the async equivalent of pg_prepare. (PHP pg_send_execute) New function that is the async equivalent of pg_execute. (PHP pg_result_error_field) New function that allows highly detailed error information, most importantly the SQLSTATE error code # Regression tests are included for all but 2 functions, the rest will # follow shortly. Docs will also follow shortly. --- ext/pgsql/php_pgsql.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'ext/pgsql/php_pgsql.h') diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 835219d983..3d27e7d5f3 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -75,9 +75,30 @@ PHP_FUNCTION(pg_ping); #if HAVE_PQPARAMETERSTATUS PHP_FUNCTION(pg_parameter_status); #endif +#if HAVE_PGTRANSACTIONSTATUS +PHP_FUNCTION(pg_transaction_status); +#endif /* query functions */ PHP_FUNCTION(pg_query); +#if HAVE_PQEXECPARAMS +PHP_FUNCTION(pg_query_params); +#endif +#if HAVE_PQPREPARE +PHP_FUNCTION(pg_prepare); +#endif +#if HAVE_PQEXECPREPARED +PHP_FUNCTION(pg_execute); +#endif PHP_FUNCTION(pg_send_query); +#if HAVE_PQSENDQUERYPARAMS +PHP_FUNCTION(pg_send_query_params); +#endif +#if HAVE_PQSENDPREPARE +PHP_FUNCTION(pg_send_prepare); +#endif +#if HAVE_PQSENDQUERYPREPARED +PHP_FUNCTION(pg_send_execute); +#endif PHP_FUNCTION(pg_cancel_query); /* result functions */ PHP_FUNCTION(pg_fetch_assoc); @@ -106,6 +127,9 @@ PHP_FUNCTION(pg_get_notify); PHP_FUNCTION(pg_get_pid); /* error message functions */ PHP_FUNCTION(pg_result_error); +#if HAVE_PQRESULTERRORFIELD +PHP_FUNCTION(pg_result_error_field); +#endif PHP_FUNCTION(pg_last_error); PHP_FUNCTION(pg_last_notice); /* copy functions */ -- cgit v1.2.1